unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Update Month value on datefield in MS sql 2005 === I need a way to update the month value on a dateTime field in my db. I'm being past an int value for the month and need to use that for the update. Is it possible to do this in the sql statement or would I be best doing it in c# in the webservice?
0
[ 2, 11100, 1617, 1923, 27, 1231, 1109, 19, 4235, 4444, 255, 812, 800, 3726, 3726, 31, 376, 21, 161, 20, 11100, 14, 1617, 1923, 27, 21, 1231, 891, 575, 19, 51, 13, 9007, 9, 31, 22, 79, 142, 640, 40, 19, 38, 1923, 26, 14, 1617, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I get the row count in JDBC? === I've executed a JDBC query to obtain a resultset. Before iterating over it, I'd like to quickly find out how many rows were returned. How can I do this? I'm using Java 6, Oracle 11g, and the latest Oracle JDBC drivers.
0
[ 2, 184, 107, 31, 164, 14, 3131, 2468, 19, 487, 43, 7229, 60, 800, 3726, 3726, 31, 22, 195, 5557, 21, 487, 43, 7229, 25597, 20, 5545, 21, 1736, 1198, 9, 115, 32, 106, 1880, 84, 32, 15, 31, 22, 43, 101, 20, 976, 477, 70, 184, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PHP: Save email attachments to server === Dr Nick here. I've been battling PHP's email reading functions for the better part of two days. I'm writing a script to read emails from a mailbox and save any attachments onto the server. If you've ever done something similar, you might understand my pain: **PHP doesn't play well with email!** I've connected to the POP3 server and I can iterate the files. Here's a rough outline of the code: if (!$mbox = imap_open ("{myserver.com:110/pop3/notls}INBOX", "u", "p")) die ('Cannot connect/check mail! Exiting'); if ($hdr = imap_check($mbox)) $msgCount = $hdr->Nmsgs; else die ("Failed to get mail"); foreach ($overview as $message) { $msgStruct = imap_fetchstructure($mbox, $message->msgno); // if it has parts, there are attachments that need reading if ($msgStruct->parts) { foreach ($msgStruct->parts as $key => $part) { switch (strtoupper($part->subtype)) { case 'GIF': case 'JPEG':case 'PNG': //do something - but what?! break; } } } } I've marked where I'm stuck. I can use `imap_fetchbody($mbox, $message->msgno, $key+1)` but that gets me a bunch of data like this: /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8S EhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEU Hh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wAAR CAHiAi0DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl 5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA ... I'm lead to believe that this is MIME data. I need it as an image! I've seen several classes bombing around the internet that claim to do the required wizardry. I can't get any of them to work. I don't understand why I'm finding this so hard! **In short**, I'm looking for something that can turn a raw MIME string into real data.
0
[ 2, 13, 26120, 45, 2079, 8517, 14575, 18, 20, 8128, 800, 3726, 3726, 744, 2341, 235, 9, 31, 22, 195, 74, 20428, 13, 26120, 22, 18, 8517, 1876, 3719, 26, 14, 574, 141, 16, 81, 509, 9, 31, 22, 79, 1174, 21, 3884, 20, 1302, 8517, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Different team members on Visual Studio 2005 and 2008 === I am currently working on an asp.net application in Visual Studio 2005. I would like to upgrade to 2008 to take advantage of some of the new features, but my remote team won't be able to upgrade to it for a while. Is it possible for only a few people on my team to upgrade to Visual Studio 2008, while the rest of the team continues to use 2005? At this point, I don't plan on using any of the 3.0+ foundation stuff yet, so that isn't a concern.
0
[ 2, 421, 173, 443, 27, 3458, 1120, 812, 17, 570, 800, 3726, 3726, 31, 589, 871, 638, 27, 40, 28, 306, 9, 2328, 3010, 19, 3458, 1120, 812, 9, 31, 83, 101, 20, 9483, 20, 570, 20, 247, 3314, 16, 109, 16, 14, 78, 967, 15, 47, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Iterating shuffled [0..n) without arrays === I know of a couple of routines that work as follows: > X<sub>n+1</sub> = Routine(X<sub>n</sub>, max) For example, something like a LCG generator: > X<sub>n+1</sub> = (a*X<sub>n</sub> + c) mod m There isn't enough parameterization in this generator to generate every sequence. Dream Function: > X<sub>n+1</sub> = Routine(X<sub>n</sub>, max, permutation number) This routine, parameterized by an index into the set of all permutations, would return the next number in the sequence. The sequence may be arbitrarily large (so storing the array and using factoradic numbers is impractical. Failing that, does anyone have pointers to similar functions that are either stateless or have a constant amount of state for arbitrary 'max', such that they will iterate a shuffled list.
0
[ 2, 32, 106, 1880, 21444, 636, 387, 9, 9, 103, 6, 366, 7718, 18, 800, 3726, 3726, 31, 143, 16, 21, 1335, 16, 8275, 18, 30, 170, 28, 2415, 45, 13, 1, 993, 1, 7563, 1, 103, 16628, 1, 118, 7563, 1, 800, 8275, 5, 396, 1, 7563, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How Should a Non-Designer Interview a Web Designer? === As a hardcore developer and not a graphic designer, I always struggle when interviewing graphic designers/web producers. I know CSS and HTML pretty well theoretically, but couldn't design a single decent-looking page from scratch. During a face-to-face interview, we can review the candidate's portfolio, but beyond that, what are some good ways/questions to assess the candidate's skill as a graphic designer?
0
[ 2, 184, 378, 21, 538, 8, 19862, 106, 2421, 21, 2741, 4742, 60, 800, 3726, 3726, 28, 21, 16626, 10058, 17, 52, 21, 8479, 4742, 15, 31, 550, 4697, 76, 2421, 68, 8479, 12760, 118, 14113, 5836, 9, 31, 143, 272, 18, 18, 17, 13, 158...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I automatically add some skeleton code when creating a new file with vim === When creating a new file with vim, I would like to automatically add some skeleton code. For example, when creating a new xml file, I would like to add the first line: <?xml version="1.0"?> Or when creating an html file, I would like to add: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title></title> </head> <body> </body> </html>
0
[ 2, 184, 92, 31, 7499, 3547, 109, 11714, 1797, 76, 2936, 21, 78, 3893, 29, 1790, 79, 800, 3726, 3726, 76, 2936, 21, 78, 3893, 29, 1790, 79, 15, 31, 83, 101, 20, 7499, 3547, 109, 11714, 1797, 9, 26, 823, 15, 76, 2936, 21, 78, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
.NET : How do you remove a specific node from an XMLDocument using XPATH? === Using C# How do you remove a specific node from an XMLDocument using XPATH?
0
[ 2, 13, 9, 2328, 13, 45, 184, 107, 42, 4681, 21, 1903, 15421, 37, 40, 23504, 28132, 568, 993, 8353, 60, 800, 3726, 3726, 568, 272, 5910, 184, 107, 42, 4681, 21, 1903, 15421, 37, 40, 23504, 28132, 568, 993, 8353, 60, 3, 0, 0, 0,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
What's a good book for learning Cocoa and Mac programming? === I'm looking for *the* book for an experienced developer wanting to learn Cocoa.
4
[ 2, 98, 22, 18, 21, 254, 360, 26, 2477, 24507, 17, 1572, 3143, 60, 800, 3726, 3726, 31, 22, 79, 699, 26, 1637, 124, 2483, 360, 26, 40, 3882, 10058, 4638, 20, 2484, 24507, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
What tools and techniques do you use to find dead code in .NET? === I've seen similar questions for [java][1] and [VB.NET][2], but nothing general for .NET, or specific to C# yet. In the past, I've decorated methods with the Obsolete attribute (passing true so the compiler will issue an error, as described in [MSDN][3]). I'd be interested in seeing the suggestions of others (beyond tools like FxCop or ReSharper). [1]: http://stackoverflow.com/questions/162551/how-to-find-unuseddead-code-in-java-projects [2]: http://stackoverflow.com/questions/36036/finding-unreferenced-code-in-vbnet [3]: http://msdn.microsoft.com/en-us/library/aa664623.aspx
0
[ 2, 98, 4672, 17, 4212, 107, 42, 275, 20, 477, 828, 1797, 19, 13, 9, 2328, 60, 800, 3726, 3726, 31, 22, 195, 541, 835, 2346, 26, 636, 1004, 1385, 500, 2558, 165, 500, 17, 636, 20468, 9, 2328, 500, 2558, 135, 500, 15, 47, 626, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why can't I save CSS changes in FireBug? === FireBug is the most convenient tool I've found for editing CSS - so why isn't there a simple "Save" option? I am always finding myself making tweaks in FireBug, then going back to my original .css file and replicating the tweaks. Has anyone come up with a better solution?
0
[ 2, 483, 92, 22, 38, 31, 2079, 272, 18, 18, 1693, 19, 535, 16254, 60, 800, 3726, 3726, 535, 16254, 25, 14, 127, 12845, 5607, 31, 22, 195, 216, 26, 9510, 272, 18, 18, 13, 8, 86, 483, 2532, 22, 38, 80, 21, 1935, 13, 7, 19863, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I detect "Easter Egg" mode in my Palm OS application? === Since the early days, Palm OS has had a special "easter egg" mode that's enabled by making the right gesture in one of the Preference panels. On current Palm Treo and Centro devices, this is turned on by doing a clockwise swirl above the "Tips" button in the Power panel. Some applications, like the Blazer web browser, enable special features when easter eggs are active. How can I detect this in my own program?
0
[ 2, 184, 107, 31, 9092, 13, 7, 2857, 106, 6387, 7, 3740, 19, 51, 3044, 13, 759, 3010, 60, 800, 3726, 3726, 179, 14, 274, 509, 15, 3044, 13, 759, 63, 41, 21, 621, 13, 7, 2857, 106, 6387, 7, 3740, 30, 22, 18, 9338, 34, 544, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the difference with these two sets of code === What is the difference between these two pieces of code type IInterface1 = interface procedure Proc1; end; IInterface2 = interface procedure Proc2; end; TMyClass = class(TInterfacedObject, IInterface1, IInterface2) protected procedure Proc1; procedure Proc2; end; And the following : type IInterface1 = interface procedure Proc1; end; IInterface2 = interface(Interface2) procedure Proc2; end; TMyClass = class(TInterfacedObject, IInterface2) protected procedure Proc1; procedure Proc2; end; If they are one and the same, are there any advantages, or readability issues with either. I guess the second means you cannot write a class that implements IInterface2 without implementing IInterface1, whilst with the first you can.
0
[ 2, 98, 25, 14, 2841, 29, 158, 81, 3415, 16, 1797, 800, 3726, 3726, 98, 25, 14, 2841, 128, 158, 81, 2491, 16, 1797, 1001, 31, 6280, 6413, 165, 800, 6573, 7004, 13, 15617, 165, 73, 241, 73, 31, 6280, 6413, 135, 800, 6573, 7004, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Interface to versioned dictionary === I have an versioned document store which I want to access through an dict like interface. Common usage is to access the latest revision (get, set, del), but one should be able to access specific revisions too (keys are always str/unicode or int). from UserDict import DictMixin class VDict(DictMixin): def __getitem__(self, key): if isinstance(key, tuple): docid, rev = key else: docid = key rev = None # set to tip rev print docid, rev # return ... In [1]: d = VDict() In [2]: d[2] 2 None In [3]: d[2, 1] 2 1 This solution is a little bit tricky and I'm not sure if it is a clean, understandable interface. Should I provide a function def getrev(self, docid, rev): ... instead?
0
[ 2, 6573, 20, 615, 69, 9186, 800, 3726, 3726, 31, 57, 40, 615, 69, 4492, 1718, 56, 31, 259, 20, 1381, 120, 40, 13, 16315, 101, 6573, 9, 757, 7514, 25, 20, 1381, 14, 5736, 11323, 13, 5, 3060, 15, 309, 15, 1506, 6, 15, 47, 53, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
XML-RPC authentication/authorization - best practices? === We don't exactly comply with the XML-RPC spec, but the concepts are nearly identical. A client comes in over HTTP/HTTPS with an XML payload. We respond with an XML payload answering the request. This is primarily machine to machine, so no human to type a username/password. Our construct runs within apache tomcat. We would like to authenticate the request and since not every service is available to every client, we need to authorize the request as well. We have both subscription and per use charging models so it is necessary to log everything. What would you recommend for both server and client?
0
[ 2, 23504, 8, 139, 5779, 27963, 118, 10007, 1829, 13, 8, 246, 5242, 60, 800, 3726, 3726, 95, 221, 22, 38, 1890, 14665, 29, 14, 23504, 8, 139, 5779, 12737, 15, 47, 14, 8700, 50, 1212, 6323, 9, 21, 6819, 1624, 19, 84, 7775, 118, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to change ToolTip's behavior on a TreeView? === When using tooltips to show a detailed description of a TreeNode, the tooltip is drawn on top of the node, as if it was completing the node's text. But what I need is the tooltip to show right below the mouse pointer and not on top of the TreeNode. Any idea how to do this?
0
[ 2, 184, 20, 753, 5607, 10169, 22, 18, 3257, 27, 21, 1541, 4725, 60, 800, 3726, 3726, 76, 568, 5607, 10169, 18, 20, 298, 21, 6036, 5318, 16, 21, 1541, 251, 546, 15, 14, 5607, 10169, 25, 3160, 27, 371, 16, 14, 15421, 15, 28, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
perl CGI script to write a posted file === How would I write a perl CGI script that receives a file via a HTTP post and saves that to the file system?
0
[ 2, 416, 255, 272, 2234, 3884, 20, 2757, 21, 6054, 3893, 800, 3726, 3726, 184, 83, 31, 2757, 21, 416, 255, 272, 2234, 3884, 30, 8359, 21, 3893, 1197, 21, 7775, 678, 17, 16815, 30, 20, 14, 3893, 329, 60, 3, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
The value of hobby game development === Does attempting to develop some sort of game, even just as a hobby during leisure time provide useful (professional) experience or is it a childish waste of time? I have pursued small personal game projects on and off throughout my programming career. I've found the (often) strict performance requirements and escalating design complexity have taught me some of my most useful programming lessons. In these projects to name just a few, I very quickly came face to face with: "Everything is fast for small N". I also discovered the hard way about using basic object oriented design principles to manage complexity. In a field where many technologies and topics can be quite dry/dull, I think hobby game development is important in motivating new (and not so new) developers to brush up on essential skills while having fun at the same time. [This question](http://stackoverflow.com/questions/157319/do-you-have-a-hobby-development-project) talks about hobby projects in general, however here I am more interested in game projects specially and how valuable they are to professional programmers.
0
[ 2, 14, 1923, 16, 18229, 250, 522, 800, 3726, 3726, 630, 6314, 20, 2803, 109, 2058, 16, 250, 15, 166, 114, 28, 21, 18229, 112, 11376, 85, 1181, 4811, 13, 5, 17056, 6, 1496, 54, 25, 32, 21, 26433, 4600, 16, 85, 60, 31, 57, 9613,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to parse formatted email address into display name and email address? === Given the email address: "Jimbo" &lt;jim@example.com&gt; If I try to pass this to MailAddress I get the exception: > The specified string is not in the form required for an e-mail address. How do I parse this address into a display name (Jimbo) and email address (jim@example.com) in C#? EDIT: I'm looking for C# code to parse it.
0
[ 2, 184, 20, 2017, 870, 13, 29850, 8517, 3218, 77, 3042, 204, 17, 8517, 3218, 60, 800, 3726, 3726, 504, 14, 8517, 3218, 45, 13, 7, 1616, 12536, 7, 279, 255, 38, 73, 21476, 1, 29041, 9, 960, 1569, 263, 38, 73, 100, 31, 1131, 20,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Doing your own custom .NET event processing loop === a few years ago, I remember reading a book which described how you could override the default event 'dispatcher' implementation in .NET with your own processor. <pre><code> class foo { public event EventHandler myEvent; ... } ... myFoo.myEvent += myBar1.EventHandler; myFoo.myEvent += myBar2.EventHandler; </code></pre> Whenever the event fires, both myBar1 and myBar2 handlers will be called. If I remember, the default implementation of this loop uses a linked list and simply iterates over the list and calls the EventHandler delegates in order. My question is two fold: - does someone know the book I was reading? - Why would you want to override the default implementation (which might be answered in the book)?
0
[ 2, 845, 154, 258, 5816, 13, 9, 2328, 807, 5511, 5293, 800, 3726, 3726, 21, 310, 122, 1464, 15, 31, 1518, 1876, 21, 360, 56, 745, 184, 42, 110, 84, 11891, 14, 12838, 807, 13, 22, 2906, 23661, 106, 22, 6123, 19, 13, 9, 2328, 29,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using system's standard Edit menu in a Palm OS app === How can I use the standard Edit menu in my Palm OS application, instead of having to implement my own Cut/Copy/Paste/Keyboard handlers?
0
[ 2, 568, 329, 22, 18, 1236, 9392, 11379, 19, 21, 3044, 13, 759, 4865, 800, 3726, 3726, 184, 92, 31, 275, 14, 1236, 9392, 11379, 19, 51, 3044, 13, 759, 3010, 15, 700, 16, 452, 20, 8713, 51, 258, 1077, 118, 19625, 118, 19802, 62, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How to embed a browser object, other than IE<n>, in a Delphi application === Using the default TWebBrowser makes things easy to embed a web browser. Unfortunately the one that comes in by default is IE&lt;n&gt;. I'm wondering how does one integrate a Gecko or WebKit one. 1. Are there VCL examples somewhere? 2. If not, how would one go about doing it? 3. Where's the best place to find the core for Gecko and/or WebKit in an embeddable format?
0
[ 2, 184, 20, 11911, 69, 21, 16495, 3095, 15, 89, 119, 13, 660, 1, 103, 1, 15, 19, 21, 23030, 3010, 800, 3726, 3726, 568, 14, 12838, 13, 38, 14113, 25699, 4104, 1364, 564, 2010, 20, 11911, 69, 21, 2741, 16495, 9, 6200, 14, 53, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Read fixed width record from text file === I've got a text file full of records where each field in each record is a fixed width. My first approach would be to parse each record simply using string.Substring(). Is there a better way? For example, the format could be described as: <Field1(8)><Field2(16)><Field3(12)> And an example file with two records could look like: SomeData0000000000123456SomeMoreData Data2 0000000000555555MoreData I just want to make sure I'm not overlooking a more elegant way than Substring().
0
[ 2, 1302, 3535, 9456, 571, 37, 1854, 3893, 800, 3726, 3726, 31, 22, 195, 330, 21, 1854, 3893, 503, 16, 742, 113, 206, 575, 19, 206, 571, 25, 21, 3535, 9456, 9, 51, 64, 2141, 83, 44, 20, 2017, 870, 206, 571, 1659, 568, 3724, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rendered pIxel width data for each character in a browser's font === I have a table column that needs to be limited to a certain width - say 100 pixels. At times the text in that column is wider than this and contains no spaces. For example: a_really_long_string_of_text_like_this_with_no_line_breaks_makes_the_table_unhappy I would like to calculate the width of text server-side and add an ellipsis after the correct number of characters. The problem is that I don't have data about the rendered size of the text. For example, assuming the browser was Firefox 3 and the font was 12px Arial. What would be the width of the letter "a", the width of the letter "b", etc.? Do you have data showing the pixel width of each character? Or a program to generate it? I think a clever one-time javascript script could do the trick. But I don't want to spend time re-inventing the wheel if someone else has already done this. I am surely not the first person to come up against this problem.
0
[ 2, 10877, 18146, 9456, 1054, 26, 206, 925, 19, 21, 16495, 22, 18, 9978, 800, 3726, 3726, 31, 57, 21, 859, 4698, 30, 2274, 20, 44, 1317, 20, 21, 1200, 9456, 13, 8, 395, 808, 18146, 18, 9, 35, 436, 14, 1854, 19, 30, 4698, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Dojo DnD acceptance of outside objects === Is it possible to code a Dojo DnD target to accept external objects, such as files or folders from a file explorer?
0
[ 2, 107, 1636, 13, 43, 706, 10156, 16, 719, 3916, 800, 3726, 3726, 25, 32, 938, 20, 1797, 21, 107, 1636, 13, 43, 706, 2935, 20, 3440, 4886, 3916, 15, 145, 28, 6488, 54, 19294, 18, 37, 21, 3893, 8520, 60, 3, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
What are your favorite tools to backport modifications from branch to trunk in subversion directories ? === On a project I'm working on, we use subversion, with tortoiseSVN as a client, under windows XP. As we enter in production and continue development in parallel, many branches are created. Often, we have to backport modifications made on the branch to the trunk, or to older branches. Backporting is a very delicate task, as many errors can be introduced into the code. What are your favorite tools to make backporting easier and more secure ? If possible, add only one tool per answer, and vote for your favorite ones. Thank you for your help
0
[ 2, 98, 50, 154, 3839, 4672, 20, 97, 1993, 13922, 37, 1686, 20, 6436, 19, 972, 10898, 559, 1596, 13, 60, 800, 3726, 3726, 27, 21, 669, 31, 22, 79, 638, 27, 15, 95, 275, 972, 10898, 15, 29, 25691, 18, 16578, 28, 21, 6819, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Algorithm to calculate next set in sequence === I am looking for an algorithm to calculate the next set of operations in a sequence. Here is the simple definition of the sequence. 1. Task 1A will be done every 500 hours 2. Task 2A will be done every 1000 hours 3. Task 3A will be done every 1500 hours So at t=500, do 1A. At t=1000, do both 1A and 2A, at t=1500 do 1A and 3A, but not 2A as 1500 is not a multiple of 1000. You get the idea. It would be quite easy if I had the actual time, but I don't. What I have is the history of tasks (eg last time a [1A+2A] was done). Knowing last time (eg [1A+2A]) is not enough to decide: - [1A+2A] could be at t=1000: next is [1A+3A] at t=1500 - [1A+2A] could be at t=5000: next is [1A] at t=5500 Is there an algorithm for this? It looks like a familiar problem (some sort of sieve?) but I can't seem to find a solution. Also it must "scale" as I actually have more than 3 tasks.
0
[ 2, 9083, 20, 18469, 328, 309, 19, 4030, 800, 3726, 3726, 31, 589, 699, 26, 40, 9083, 20, 18469, 14, 328, 309, 16, 1311, 19, 21, 4030, 9, 235, 25, 14, 1935, 5465, 16, 14, 4030, 9, 137, 9, 3005, 137, 58, 129, 44, 677, 352, 303...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using Length() with multi-dimensional dynamic arrays in Delphi === I am using a multi-dimensional dynamic array in delphi and am trying to figure this out: I have 2 seperate values for the first index and second index that are totally seperate of each other. As new values come I want to grow the array if that new value is outside of either bound. For new values x, y I check: if Length(List) < (x + 1) then SetLength(List, x + 1); if Length(List[0]) < (y + 1) then SetLength(List, Length(gScriptList), y + 1); Is this the correct way to do this or is there a better way to grow the array as needed?
0
[ 2, 568, 1476, 5, 6, 29, 1889, 8, 7865, 7782, 7718, 18, 19, 23030, 800, 3726, 3726, 31, 589, 568, 21, 1889, 8, 7865, 7782, 7718, 19, 23030, 17, 589, 749, 20, 1465, 48, 70, 45, 31, 57, 172, 10332, 106, 1373, 4070, 26, 14, 64, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Ora 12154 error === I recently deploy one web application in one of my development servers. I'm using oracle, asp.net and c#. When I run the application in the server everything works fine, but when I try to run the application outside of the server (using my pc, for example) i get this error: ORA-12154: TNS:could not resolve the connect identifier specified If i run the application in my pc with visual studio it works fine. Oracle is installed in Server "A" and the application is in server "B". Server "A" is in one domain and server "B" is in other domain.My pc is in the same domain has Server "A". In my pc I can find the file tnsname.ora in C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN, but in Server "B" i can´t find it anywhere any idea? Thanks for the help.
0
[ 2, 54, 58, 390, 13758, 7019, 800, 3726, 3726, 31, 1989, 17617, 53, 2741, 3010, 19, 53, 16, 51, 522, 17595, 9, 31, 22, 79, 568, 15759, 15, 28, 306, 9, 2328, 17, 272, 5910, 9, 76, 31, 485, 14, 3010, 19, 14, 8128, 796, 693, 112...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Sql Server 2005 how to change dbo login name === I have a database with user 'dbo' that has a login name "domain\xzy". How do I change it from "domain\xzy" to "domain\abc".
0
[ 2, 4444, 255, 8128, 812, 184, 20, 753, 13, 43, 1192, 6738, 108, 204, 800, 3726, 3726, 31, 57, 21, 6018, 29, 4155, 13, 22, 43, 1192, 22, 30, 63, 21, 6738, 108, 204, 13, 7, 537, 6232, 1, 396, 3327, 7, 9, 184, 107, 31, 753, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best way to store urls locally === I am creating an RSS reader as a hobby project, and at the point where the user is adding his own URL's. I was thinking of two things. - A plaintext file where each url is a single line - SQLite where i can have unique ID's and descriptions following the URL Is the SQLite idea to much of an overhead or is there a better way to do things like this?
0
[ 2, 246, 161, 20, 1718, 13, 911, 7532, 6680, 800, 3726, 3726, 31, 589, 2936, 40, 13, 1224, 18, 7765, 28, 21, 18229, 669, 15, 17, 35, 14, 454, 113, 14, 4155, 25, 4721, 33, 258, 287, 6362, 22, 18, 9, 31, 23, 1440, 16, 81, 564, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Picture over Flash === Do you know any solution to put a picture over a Flash? It **must** work in IE6, IE7, Firefox for Windows, MacOSX, Linux and Safari.
0
[ 2, 2151, 84, 4433, 800, 3726, 3726, 107, 42, 143, 186, 4295, 20, 442, 21, 2151, 84, 21, 4433, 60, 32, 13, 1409, 3605, 38, 1409, 170, 19, 13, 660, 379, 15, 13, 660, 465, 15, 535, 18219, 26, 1936, 15, 1572, 759, 396, 15, 13024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Subclassing a class with private members === One of the really nice things about python is the simplicity with which you can name variables that have the same name as the accessor: self.__value = 1 def value(): return self.__value Is there a simple way of providing access to the private members of a class that I wish to subclass? Often I wish to simply work with the raw data objects inside of a class without having to use accessors and mutators all the time. I know this seems to go against the general idea of private and public, but usually the class I am trying to subclass is one of my own which I am quite happy to expose the members from to a subclass but not to an instance of that class. Is there a clean way of providing this distinction?
0
[ 2, 972, 1898, 68, 21, 718, 29, 932, 443, 800, 3726, 3726, 53, 16, 14, 510, 2210, 564, 88, 20059, 25, 14, 20595, 29, 56, 42, 92, 204, 12157, 30, 57, 14, 205, 204, 28, 14, 1381, 248, 45, 1119, 9, 1, 15165, 800, 137, 6312, 1923...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to retrieve n characters from char array === i have a char array in a C app that i have to split into parts of 250 so i can send it along to another application that doesn't accept more at one time, how would i do that ? Platform: win32. Thanks in advance!
0
[ 2, 184, 20, 11917, 13, 103, 1766, 37, 4892, 7718, 800, 3726, 3726, 31, 57, 21, 4892, 7718, 19, 21, 272, 4865, 30, 31, 57, 20, 2132, 77, 1341, 16, 6774, 86, 31, 92, 2660, 32, 303, 20, 226, 3010, 30, 1437, 22, 38, 3440, 91, 35...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Writing maintainable code === What is the single most important factor for writing maintainable code (language independent)?
0
[ 2, 1174, 4027, 579, 1797, 800, 3726, 3726, 98, 25, 14, 345, 127, 681, 3932, 26, 1174, 4027, 579, 1797, 13, 5, 7020, 1124, 6, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Django and Python 2.6 === I'm just starting to get into Django, and of course as of last night one of the two new Python versions went final (2.6 obviously ;)) so I'm wondering if 2.6 plus Django is ready for actual use or do the Django team need more time to finish with tweaks/cleanup? All the google searches I did were inconclusive, I saw bits about some initial test runs on beta 2 but nothing more recent seemed to show up.
0
[ 2, 3857, 14541, 17, 20059, 172, 9, 379, 800, 3726, 3726, 31, 22, 79, 114, 1422, 20, 164, 77, 3857, 14541, 15, 17, 16, 674, 28, 16, 236, 343, 53, 16, 14, 81, 78, 20059, 3281, 296, 426, 13, 5, 135, 9, 379, 4409, 13, 73, 6, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you log the machine name via log4net? === I am using Log4Net with the AdoNetAppender to log messages from a simple systray application into a SQL Server 2005 database. I want to log the machine name along with the log message because this application will be running on multiple machines and I need to know on which one the message originated. But, I cannot find a way to expose this information via the log4net.Layout.PatternLayout that I am using with the appender. Is there a way to log the machine name via log4net in this manner?
0
[ 2, 184, 107, 42, 6738, 14, 1940, 204, 1197, 6738, 300, 2328, 60, 800, 3726, 3726, 31, 589, 568, 6738, 300, 2328, 29, 14, 21, 804, 1198, 22358, 1157, 20, 6738, 7561, 37, 21, 1935, 10315, 5253, 93, 3010, 77, 21, 4444, 255, 8128, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What applications is Python optimal for? === I'm already a professional J2EE developer by day, and Rails developer by night. I'm planning on adding Python to my list of skills. I'm already convinced a language is just a tool, so I'm not interested in a religious war. So, in your considered opinion, what kinds of applications does Python hit the sweet spot? And why? What advantages does it have, and why do these advantages outweigh the costs in adopting Python?
0
[ 2, 98, 3767, 25, 20059, 17586, 26, 60, 800, 3726, 3726, 31, 22, 79, 614, 21, 736, 487, 135, 2851, 10058, 34, 208, 15, 17, 2240, 18, 10058, 34, 343, 9, 31, 22, 79, 2334, 27, 4721, 20059, 20, 51, 968, 16, 3207, 9, 31, 22, 79, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using PostMessage in Windows Mobile to simulate a menu pick === I'm writing a routine to provide user definable keyboard short-cuts for any menu item in my Windows Mobile 5 application, which is in C++/MFC. To do this I am getting all of the available menu command IDs, and using the CWnd::PostMessage(WM_COMMAND,MyMenuID) to post it to the application. I use this technique to good effect elsewhere for inter-thread comms, but not with menu command IDs. Any ideas why this doesn't work. The app is document view, and I have tried posting to the CMainFrame and CView derived windows. I could write a god awful switch statement but I feel posting a message should work.
0
[ 2, 568, 678, 3845, 18, 1303, 19, 1936, 3241, 20, 24969, 21, 11379, 2036, 800, 3726, 3726, 31, 22, 79, 1174, 21, 8275, 20, 1181, 4155, 121, 5617, 579, 8896, 502, 8, 4118, 18, 26, 186, 11379, 9101, 19, 51, 1936, 3241, 331, 3010, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Packaging up the .net framework with a .net application deployment. === Can you package up the .Net framework in an installer created in Visual Studio? If so how? I've seen this done with Install4J packaging a JVM but I think that was the JVM to run Install4J.
0
[ 2, 16850, 71, 14, 13, 9, 2328, 6596, 29, 21, 13, 9, 2328, 3010, 10475, 9, 800, 3726, 3726, 92, 42, 6030, 71, 14, 13, 9, 2328, 6596, 19, 40, 16146, 106, 679, 19, 3458, 1120, 60, 100, 86, 184, 60, 31, 22, 195, 541, 48, 677, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Sql Server 2005 SSIS unable to enlist SYBASE distributed transaction === Good morning, I know very little (arguably nothing) about SYBASE setup, but I do know SSIS is having trouble enlisting SYBASE in a distributed transaction. Has anyone been able to make this work? The SSIS Runtime has failed to enlist the OLE DB connection in a distributed transaction with error 0x80004005 "Unspecified error". This happens when I change the package's TransactionOption to Required. When I revert to the default "Supported", the package runs without errors (albeit not thread safe). Thanks, Alan.
0
[ 2, 4444, 255, 8128, 812, 13, 18, 4557, 2343, 20, 18036, 10315, 8436, 4387, 12799, 800, 3726, 3726, 254, 959, 15, 31, 143, 253, 265, 13, 5, 512, 3073, 4801, 626, 6, 88, 10315, 8436, 18161, 15, 47, 31, 107, 143, 13, 18, 4557, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a way to compact a SQL2000/2005 MDF file? === I deleted millions of rows of old data from a production SQL database recently, and it didn't seem to shrink the size of the .MDF file much. We have a finite amount of disk space. I am wondering if there is anything else I can do to "tighten" the file (like something analogous to Access' Compact and Repair function)?
0
[ 2, 25, 80, 21, 161, 20, 8285, 21, 4444, 255, 3050, 118, 2835, 307, 8736, 3893, 60, 800, 3726, 3726, 31, 19584, 11999, 16, 11295, 16, 315, 1054, 37, 21, 637, 4444, 255, 6018, 1989, 15, 17, 32, 223, 22, 38, 2260, 20, 16269, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
NHibernate Query problem === I'm quite new to NHibernate and starting to find my way around. I have a domain model that is somewhat like a tree. Funds have Periods have Selections have Audits Now I would like to get all Audits for a specific Fund Would look like this if I made it in SQL SELECT A.* FROM Audit A JOIN Selection S ON A.fkSelectionID = S.pkID JOIN Period P ON S.fkPeriodID = P.pkID JOIN Fund F ON P.fkFundID = F.pkID WHERE F.pkID = 1 All input appreciated!
0
[ 2, 12109, 15191, 8820, 25597, 1448, 800, 3726, 3726, 31, 22, 79, 1450, 78, 20, 12109, 15191, 8820, 17, 1422, 20, 477, 51, 161, 140, 9, 31, 57, 21, 4603, 1061, 30, 25, 4131, 101, 21, 1541, 9, 3629, 57, 7302, 57, 3155, 18, 57, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why do Jars get Excluded from Enunciate's Deployment? === I'm using [Enunciate][1] to build a prototype REST api and need to include a jar containing custom code as a library. My Ant Script looks like this: <target name="enunciate" depends="clean"> <!--include all jars--> <path id="en.classpath"> <fileset dir="${lib}"> <include name="**/*.jar" /> </fileset> </path> <!--define the task--> <taskdef name="enunciate" classname="org.codehaus.enunciate.main.EnunciateTask"> <classpath refid="en.classpath" /> </taskdef> <mkdir dir="${dist}" /> <enunciate dir="${src}" configFile="${basedir}/enunciate.xml"> <include name="**/*.java" /> <classpath refid="en.classpath"/> <export artifactId="spring.war.file" destination="${dist}/${war.name}" /> </enunciate> </target> The problem is that my custom jar is being excluded from the WAR file. It is necessary to compile the enunciate annotated classes so the jar is obviously on the classpath at compile time but enunciate is failing to include it in the distribution. I have also noticed that several of the jars needed by enunciate are not being included in the WAR file. Why are they being excluded and how do I fix it? [1]: http://enunciate.codehaus.org
0
[ 2, 483, 107, 5112, 18, 164, 13599, 37, 13, 62, 24347, 62, 22, 18, 10475, 60, 800, 3726, 3726, 31, 22, 79, 568, 636, 62, 24347, 62, 500, 2558, 165, 500, 20, 1895, 21, 7063, 760, 21, 2159, 17, 376, 20, 468, 21, 5112, 3503, 5816,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Same property, different types. === Let's say you have a class with a Uri property. Is there any way to get that property to accept both a string value and a Uri? How would you build it? I'd like to be able to do something like one of the following, but neither are supported (using VB, since it lets you specify type in the Set declaration for the 2nd one): Class MyClass Private _link As Uri ''//Option 1: overloaded property Public Property Link1 As Uri Get return _link End Get Set(ByVal value As Uri) _link = value End Set End Property Public Property link1 As String Get return _link.ToString() End Get Set(Byval value As String) _link = new Uri(value) End Set End Property ''// Option 2: Overloaded setter Public Property link2 As Uri Get return _link End Get Set(Byval value As Uri) _link = value End Set Set(Byval value As String) _link = new Uri(value) End Set End Class Given that those probably won't be supported any time soon, how else would you handle this? I'm looking for something a little nicer than just providing an additional <code>.SetLink(string value)</code> method, and I'm still on .Net2.0 (though if later versions have a nice feature for this, I'd like to hear about it). I can think of other scenarios where you might want to provide this kind of overload: a class with an SqlConnection member that lets you set either a new connection or a new connection string, for example.
0
[ 2, 205, 1354, 15, 421, 2551, 9, 800, 3726, 3726, 408, 22, 18, 395, 42, 57, 21, 718, 29, 21, 13, 3594, 1354, 9, 25, 80, 186, 161, 20, 164, 30, 1354, 20, 3440, 156, 21, 3724, 1923, 17, 21, 13, 3594, 60, 184, 83, 42, 1895, 32...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Tracking Changes to a Directory Tree over Time === Does anyone know of an application or system out there for tracking changes (files added/removed, diffs on text files) to a *non-source controlled* directory over time? Something that would let you 1. Take a snapshot of a certain directory tree at time A 2. Come back at time period B and see what has changed 3. Come back at time period C and see what's changed since time period A, and what's changed since time period B A source control repository isn't an option here. I want something that works on a directory structure that isn't under any kind of revision control.
0
[ 2, 10353, 1693, 20, 21, 16755, 1541, 84, 85, 800, 3726, 3726, 630, 1276, 143, 16, 40, 3010, 54, 329, 70, 80, 26, 10353, 1693, 13, 5, 16877, 18, 905, 118, 99, 16598, 43, 15, 20811, 18, 27, 1854, 6488, 6, 20, 21, 1637, 3951, 8, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Emacs on Mac OS X Leopard key bindings === I'm a Mac user and I've decided to learn Emacs. I've [read][1] that to reduce hand strain and improve accuracy the CTRL and CAPS LOCK keys should be swapped. How do I do this in Leopard? Also, in Terminal I have to use the ESC key to invoke meta. Is there any way to get the alt/option key to invoke meta instead? [1]: http://steve.yegge.googlepages.com/effective-emacs [2]: http://modos.org/ctrlcaps.png [3]: http://modos.org/metaterm.png
0
[ 2, 13, 62, 6893, 18, 27, 1572, 13, 759, 993, 15446, 1246, 8728, 18, 800, 3726, 3726, 31, 22, 79, 21, 1572, 4155, 17, 31, 22, 195, 868, 20, 2484, 13, 62, 6893, 18, 9, 31, 22, 195, 636, 10647, 500, 2558, 165, 500, 30, 20, 4136...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Marshal "char *" in C# === Given the following C function in a DLL: char * GetDir(char* path ); How would you P/Invoke this function into C# and marshal the char * properly. .NET seems to know how to do LPCTSTR but when I can't figure out any marshaling that doesn't cause a NotSupportedException to fire when calling this function.
0
[ 2, 7583, 13, 7, 5433, 1637, 7, 19, 272, 5910, 800, 3726, 3726, 504, 14, 249, 272, 1990, 19, 21, 13, 43, 211, 45, 4892, 1637, 164, 9035, 5, 5433, 2483, 2013, 13, 6, 73, 184, 83, 42, 351, 118, 108, 2625, 1048, 48, 1990, 77, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do i call java code from javascript code in wicket === If i can do this, how do i call java code (methods for instance) from within javascript code, in wicket.
0
[ 2, 184, 107, 31, 645, 8247, 1797, 37, 8247, 8741, 1797, 19, 14414, 800, 3726, 3726, 100, 31, 92, 107, 48, 15, 184, 107, 31, 645, 8247, 1797, 13, 5, 5909, 1807, 43, 18, 26, 4851, 6, 37, 363, 8247, 8741, 1797, 15, 19, 14414, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
sql 2005 encryption trigger === I have a script that successfully encrypts a credit card. I need it to work as a trigger, so that any insert done to the creditcard column automatically encrypts it. Right now, my trigger works BUT the creditcard column is a varchar. When an app tries to insert, I do this: <pre> DECLARE @encryptedCreditCardNumber varbinary(max) SET @encryptedCreditCardNumber = EncryptByKey(Key_GUID('testKey'), @CreditCardNumber)); </pre> That works fine, but how do I then convert the varbinary(max) to a varchar (which is what the credit card column is). The creditcard column has been a varchar for a long time at my company and a lot of legacy code depends on it being a varchar. Thank you
0
[ 2, 4444, 255, 812, 24420, 7286, 800, 3726, 3726, 31, 57, 21, 3884, 30, 3673, 1957, 11435, 18, 21, 3251, 2056, 9, 31, 376, 32, 20, 170, 28, 21, 7286, 15, 86, 30, 186, 14692, 677, 20, 14, 3251, 6648, 4698, 7499, 1957, 11435, 18, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I report an error midway through a chunked http repsonse without closing the connection? === I have an HTTP server that returns large bodies in response to POST requests (it is a SOAP server). These bodies are "streamed" via chunking. If I encounter an error midway through streaming the response how can I report that error to the client and still keep the connection open? The implementation uses a proprietary HTTP/SOAP stack so I am interested in answers at the HTTP protocol level.
0
[ 2, 184, 107, 31, 1330, 40, 7019, 13486, 120, 21, 15009, 69, 7775, 9411, 528, 870, 366, 4239, 14, 2760, 60, 800, 3726, 3726, 31, 57, 40, 7775, 8128, 30, 4815, 370, 2576, 19, 1627, 20, 678, 12279, 13, 5, 242, 25, 21, 6447, 8128, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Spawning multiple SQL tasks in SQL Server 2005 === I have a number of stored procs which I would like to all run simultaneously on the server. Ideally all on the server without reliance on connections to an external client. What options are there to launch all these and have them run simultaneously (I don't even need to wait until all the processes are done to do additional work)? I have thought of: - Launching multiple connections from a client, having each start the appropriate SP. - Setting up jobs for each SP and starting the jobs from a SQL Server connection or SP. - Using xp_cmdshell to start additional runs equivalent to osql or whetever In the latter two cases, I'm probably going to run into permissions level problems from the DBA...
0
[ 2, 27487, 1886, 4444, 255, 8674, 19, 4444, 255, 8128, 812, 800, 3726, 3726, 31, 57, 21, 234, 16, 8214, 13, 15617, 18, 56, 31, 83, 101, 20, 65, 485, 6888, 27, 14, 8128, 9, 5628, 102, 65, 27, 14, 8128, 366, 22995, 27, 6760, 20, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Formatting a field using ToText in a Crystal Reports formula field === I'm trying to create a Crystal Reports formula field (to calculate the percentage change in a price) that will return "N/A" if a particular report field is null, but return a number to two decimal places using accounting format (negative numbers surrounded by parentheses) if it is not. The closest I have been able to manage is this: If IsNull({ValuationReport.YestPrice}) Then 'N/A' Else ToText({@Price}/{ValuationReport.YestPrice}*100-100, '###.00', 2) However this represents negative numbers using a negative sign, not parentheses. I tried format strings like '###.00;(###.00)' and '(###.00)' but these were rejected as invalid. How can I achieve my goal?
0
[ 2, 2595, 1203, 21, 575, 568, 20, 11969, 19, 21, 4282, 2813, 3729, 575, 800, 3726, 3726, 31, 22, 79, 749, 20, 1600, 21, 4282, 2813, 3729, 575, 13, 5, 262, 18469, 14, 5780, 753, 19, 21, 2162, 6, 30, 129, 788, 13, 7, 103, 118, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Readonly ComboBox in WinForms === I'm writing a GUI in C#, Visual Studio 2008, using the Designer and WinForms. I've got a ComboBox control, and I'd like it to only allow to select from the provided options and not to accept a user-entered string. It doesn't appear to have a ReadOnly property, and disabling it hinders the readability of the control (as well as disallowing user-selection).
0
[ 2, 1302, 4965, 22621, 5309, 19, 628, 4190, 18, 800, 3726, 3726, 31, 22, 79, 1174, 21, 9457, 19, 272, 5910, 15, 3458, 1120, 570, 15, 568, 14, 4742, 17, 628, 4190, 18, 9, 31, 22, 195, 330, 21, 22621, 5309, 569, 15, 17, 31, 22, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Would it be possible to use web services from a Cobol program? === We have some COBOL programs in our financial applications which need to interact with some of our backend systems. One of the available interfaces is through a web service. Can a program written in Cobol make requests to a web service?
0
[ 2, 83, 32, 44, 938, 20, 275, 2741, 687, 37, 21, 326, 6966, 625, 60, 800, 3726, 3726, 95, 57, 109, 326, 6966, 1726, 19, 318, 1553, 3767, 56, 376, 20, 10001, 29, 109, 16, 318, 97, 2451, 1242, 9, 53, 16, 14, 904, 6573, 18, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a source-control system that allows tracking of file name changes? === So, I've been living with my cvs reposittories for some time. Though there is a thing I miss - if i rename a file that is alredy in repository, I need to delete the one with old name from there and add the new one. Hence, I loose all my change-history. And sometimes there's a need to rename a file in alredy existing project. From what I saw, cvs/svn can't handle something like this, or am I wrong? If not, what other source control system would you recoment, that allows the renaming of files?
0
[ 2, 25, 80, 21, 1267, 8, 12898, 329, 30, 2965, 10353, 16, 3893, 204, 1693, 60, 800, 3726, 3726, 86, 15, 31, 22, 195, 74, 634, 29, 51, 13, 12732, 18, 302, 14882, 38, 262, 2829, 26, 109, 85, 9, 362, 80, 25, 21, 584, 31, 1501, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SWT Link flickers with gradient background === I'm developing a an eclipse plugin that uses an SWT interface. I need to display text, and within that text there needs to be links. The only two widgets that I've found that will allow me to include clickable links in text are Link and Browser. Browser, however, is overkill for my needs, and I couldn't properly customize the look of it. This only leaves the Link widget. The problem is I need the Link widget to inherit a gradient from the Composite in which it is in. It does this correctly, only when it is resized or scrolled the Link component flickers. The Link is the only component in which I have seen this effect. In an attempt to fix this I've tried manipulating other components into having clickable links, but I haven't found a good solution yet. Is there anyway to fix the flickering effect on the Link, or is there a different component which would support links? Thanks, Brian
0
[ 2, 8783, 38, 3508, 18709, 18, 29, 17442, 2395, 800, 3726, 3726, 31, 22, 79, 3561, 21, 40, 11652, 10922, 108, 30, 2027, 40, 8783, 38, 6573, 9, 31, 376, 20, 3042, 1854, 15, 17, 363, 30, 1854, 80, 2274, 20, 44, 6271, 9, 14, 104, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Eclipse RCP Splash Screen === I'm involved in a project that is attempting to use the Eclipse RCP splash screen to gather user credentials, language, etc. If this screen loses focus, it is not available (under Windows at least) through the ALt-Tab functionality, and can only be found by minimizing all other windows and uncovering it. Any way of having this screen allow itself to be activated in this way? They're avoiding creating an intermediate screen, for reasons unknown at this point.
0
[ 2, 11652, 761, 7439, 13873, 2324, 800, 3726, 3726, 31, 22, 79, 1013, 19, 21, 669, 30, 25, 6314, 20, 275, 14, 11652, 761, 7439, 13873, 2324, 20, 7442, 4155, 5059, 43, 10107, 18, 15, 816, 15, 2722, 9, 100, 48, 2324, 14745, 1776, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Including arrary index in XML Serialization === I have a class that looks like this public class SomeClass { public SomeChildClass[] childArray; } which will output XML from the XMLSerializer like this: <SomeClass> <SomeChildClass> ... </SomeChildClass> <SomeChildClass> ... </SomeChildClass> </SomeClass> But I want the XML to look like this: <SomeClass> <SomeChildClass index=1> ... </SomeChildClass> <SomeChildClass index=2> ... </SomeChildClass> </SomeClass> Where the index attribute is equal to the items position in the array. I could add an index property to SomeChildClass with the "XMLAttribute" attribute but then I would have to remember to loop through the array and set that value before I serialize my object. Is there some attribute i can add or some other way to automatically generate the index attribute for me?
0
[ 2, 215, 13, 8576, 622, 4348, 19, 23504, 5956, 1829, 800, 3726, 3726, 31, 57, 21, 718, 30, 1879, 101, 48, 317, 718, 109, 1898, 13, 1, 317, 109, 11287, 1898, 2558, 500, 850, 8576, 93, 73, 13, 1, 56, 129, 5196, 23504, 37, 14, 235...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Dynamically Load Embedded Resource Report Using Microsoft.Reporting.WinForms === How does one dynamically load a new report from an embedded resource? I have created a reporting project that contains a report as an embedded resource. I added a second report file and use the following code to switch reports: this.reportViewer1.LocalReport.ReportEmbeddedResource = "ReportsApplication2.Report2.rdlc"; this.reportViewer1.LocalReport.Refresh(); this.reportViewer1.RefreshReport(); When this code executes, the original report remains visible in the report viewer.
0
[ 2, 7782, 1326, 6305, 12138, 6577, 1330, 568, 7099, 9, 17437, 68, 9, 4181, 4190, 18, 800, 3726, 3726, 184, 630, 53, 7782, 1326, 6305, 21, 78, 1330, 37, 40, 12138, 6577, 60, 31, 57, 679, 21, 6670, 669, 30, 1588, 21, 1330, 28, 40, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Selecting proper toolkit for a 2D simulation project in Java. === I am looking for a toolkit that will allow me to do design widgets containing 2D graphics for an elevator simulation in Java. Once created, those widgets will be integrated with SWT, Swing, or QtJambi framework. Background information: I am developing an Elevator Simulator for fun. My main goal is to increase my knowledge of Java, Eclipse IDE, and more importantly concurrency. It is certainly fun and I enjoyed implementing this <a href="http://dotnet.zcu.cz/NET_2006/Papers_2006/short/B31-full.pdf">State Machine Pattern</a>. Anyway, I am at a point where I would like to see the Elevator on the screen and not limit myself to log its operations on the console. I will probably choose SWT, Swing, or QtJambi for the UI controls but I am wondering what to do with the graphical part of the simulation.
0
[ 2, 20764, 4119, 5607, 13703, 26, 21, 172, 43, 10926, 669, 19, 8247, 9, 800, 3726, 3726, 31, 589, 699, 26, 21, 5607, 13703, 30, 129, 1655, 55, 20, 107, 704, 4807, 43, 3060, 18, 3503, 172, 43, 8351, 26, 40, 6026, 10926, 19, 8247, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
The RunInstaller attribute in a WMI provider assembley === I am creating a decoupled WMI provider in a class library. Everything I have read points towards including something along these lines: [System.ComponentModel.RunInstaller(true)] public class MyApplicationManagementInstaller : DefaultManagementInstaller { } I gather the purpose of this installation is because the Windows WMI infrastructure needs to be aware of the structure of my WMI provider before it is used. My question is - when is this "installer" ran? MSDN says that the installer will be invoked "during installation of an assembly", but I am not sure what that means or when it would happen in the context of a class library containing a WMI provider. I was under the impression that this was an automated replacement for manually running **InstallUtil.exe** against the assembly containing the WMI provider, but changes I make to the provider are not recognised by the Windows WMI infrastructure unless I manually run InstallUtil from the command prompt. I can do this on my own machine during development, but if an application using the provider is deployed to other machines - what then? It seems that this RunInstaller / DefaultManagementInstaller combination is not working properly - correct?
0
[ 2, 14, 485, 108, 21300, 106, 35, 14755, 19, 21, 619, 1435, 11747, 13, 13736, 93, 800, 3726, 3726, 31, 589, 2936, 21, 121, 17856, 1294, 619, 1435, 11747, 19, 21, 718, 1248, 9, 796, 31, 57, 1302, 819, 1016, 215, 301, 303, 158, 156...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MySQL Query: LIMITing a JOIN === Say I have to tables I want to join. Categories: id name ---------- 1 Cars 2 Games 3 Pencils And items: id categoryid itemname --------------------------- 1 1 Ford 2 1 BMW 3 1 VW 4 2 Tetris 5 2 Pong 6 3 Foobar Pencil Factory I want a query that returns the category and the first (and only the first) itemname: category.id category.name item.id item.itemname ------------------------------------------------- 1 Cars 1 Ford 2 Games 4 Tetris 3 Pencils 6 Foobar Pencil Factory And is there a way I could get random results like: category.id category.name item.id item.itemname ------------------------------------------------- 1 Cars 3 VW 2 Games 5 Pong 3 Pencils 6 Foobar Pencil Factory Thanks!
0
[ 2, 51, 18, 22402, 25597, 45, 17567, 21, 1865, 800, 3726, 3726, 395, 31, 57, 20, 7484, 31, 259, 20, 1865, 9, 6422, 45, 4924, 204, 13, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 137, 2137, 172, 466, 203, 13092, 18, 17, 3755, 45, 4924, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
urllib2 file name === If I open a file using urllib2, like so: remotefile = urllib2.openfile('http://example.com/somefile.zip') Is there an easy way to get the file name other then parsing the original URL?
0
[ 2, 13, 911, 211, 4598, 135, 3893, 204, 800, 3726, 3726, 100, 31, 368, 21, 3893, 568, 13, 911, 211, 4598, 135, 15, 101, 86, 45, 5388, 16877, 800, 13, 911, 211, 4598, 135, 9, 10157, 16877, 5, 22, 21127, 6903, 29041, 9, 960, 118, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Where can I find free Javascript hosting? === Is there any free hosting for Javascript? Recently google has been hosting jQuery,etc... and Yahoo hosts it's YUI, which is great, but it'd be even better if there was a service that could host user scripts and things like that. Any ideas?
0
[ 2, 113, 92, 31, 477, 551, 8247, 8741, 10637, 60, 800, 3726, 3726, 25, 80, 186, 551, 10637, 26, 8247, 8741, 60, 1989, 8144, 63, 74, 10637, 487, 8190, 93, 15, 1198, 150, 9, 9, 9, 17, 23553, 5397, 32, 22, 18, 2600, 49, 15, 56, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
High resolution timer in .NET === I'd like to do some basic profiling of my code, but found that the DateTime.Now in C# only have a resolution of about 16 ms. There must be better time keeping constructs that I haven't yet found.
0
[ 2, 183, 4302, 85, 139, 19, 13, 9, 2328, 800, 3726, 3726, 31, 22, 43, 101, 20, 107, 109, 2125, 8721, 49, 802, 16, 51, 1797, 15, 47, 216, 30, 14, 1231, 891, 9, 1387, 19, 272, 5910, 104, 57, 21, 4302, 16, 88, 347, 4235, 9, 80...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I detect if I'm compiling for a 64bits architecture in C++ === In a c++ function I need the compiler to choose a different block if it is compiling for a 64 bit architecture. I know a way to do it for MSVC++ and g++, so i'll post it as an answer. However I would like to know if there is a better way (more elegant that would work for all compilers/all 64 bits architectures). If there is not a better way, what other predefined macros should I look for in order to be compatible with other compiler/architectures? Thanls,
0
[ 2, 184, 92, 31, 9092, 100, 31, 22, 79, 24378, 26, 21, 4384, 3326, 18, 2607, 19, 272, 20512, 800, 3726, 3726, 19, 21, 272, 20512, 1990, 31, 376, 14, 21486, 20, 3538, 21, 421, 1921, 100, 32, 25, 24378, 26, 21, 4384, 1142, 2607, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Coupling, Cohesion and the Law of Demeter === The [Law of Demeter][1] indicates that you should only speak to objects that you know about directly. That is, do not perform method chaining to talk to other objects. When you do so, you are establishing improper linkages with the intermediary objects, inappropriately [coupling][2] your code to other code. That's bad. The solution would be for the class you do know about to essentially expose simple wrappers that delegate the responsibility to the object it has the relationship with. That's good. But, that seems to result in the class having low [cohesion][3]. No longer is it simply responsible for precisely what it does, but it also has the delegates that in a sense, making the code less cohesive by duplicating portions of the interface of it's related object. That's bad. Does it really result in lowering cohesion? Is it the lesser of two evils? Is this one of those gray areas of development, where you can debate where the line is, or are there strong, principled ways of making a decision of where to draw the line and what criteria you can use to make that decision? [1]: http://en.wikipedia.org/wiki/Law_of_Demeter [2]: http://en.wikipedia.org/wiki/Coupling_(computer_science) [3]: http://en.wikipedia.org/wiki/Cohesion_(computer_science)
0
[ 2, 20920, 15, 326, 438, 5991, 17, 14, 451, 16, 121, 7307, 800, 3726, 3726, 14, 636, 2371, 16, 121, 7307, 500, 2558, 165, 500, 6475, 30, 42, 378, 104, 1960, 20, 3916, 30, 42, 143, 88, 1703, 9, 30, 25, 15, 107, 52, 2985, 2109, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Sqlite export === Does anyone know of a tool to migrate a Sqlite database to SQL Server(both the structure and data)? Thanks?
0
[ 2, 4444, 10601, 7487, 800, 3726, 3726, 630, 1276, 143, 16, 21, 5607, 20, 22985, 21, 4444, 10601, 6018, 20, 4444, 255, 8128, 5, 8110, 14, 1411, 17, 1054, 6, 60, 3669, 60, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How do I shrink the transaction log on MS SQL 2000 databases? === I have several databases where the transaction log (.LDF) is many times larger than the database file (.MDF). What can I do to automatically shrink these or keep them from getting so large?
0
[ 2, 184, 107, 31, 16269, 14, 12799, 6738, 27, 4235, 4444, 255, 824, 6018, 18, 60, 800, 3726, 3726, 31, 57, 238, 6018, 18, 113, 14, 12799, 6738, 13, 5, 9, 255, 8736, 6, 25, 151, 436, 1662, 119, 14, 6018, 3893, 13, 5, 9, 79, 87...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I grab events from sub-controls on a user-control in a WinForms App? === Is there any way for the main form to be able to intercept events firing on a subcontrol on a user control? I've got a custom user-control embedded in the main Form of my application. The control contains various subcontrols that manipulate data, which itself is displayed by other controls on the main form. What I'd like is if the main form could be somehow informed when the user changes subcontrols, so I could update the data and the corresponding display elsewhere. Right now, I am cheating. I have a delegate hooked up to the focus-leaving event of the subcontrols. This delegate changes a property of the user-control I'm not using elsewhere (in this cause, CausesValidation). I then have a delegate defined on the main form for when the CausesValidation property of the user control changes, which then directs the app to update the data and display. A problem arises because I also have a delegate set up for when focus leaves the user-control, because I need to validate the fields in the user-control before I can allow the user to do anything else. However, if the user is just switching between subcontrols, I don't want to validate, because they might not be done editing. Basically, I want the data to update when the user switches subcontrols OR leaves the user control, but not validate. When the user leaves the control, I want to update AND validate. Right now, leaving the user-control causes validation to fire twice.
0
[ 2, 184, 107, 31, 4931, 963, 37, 972, 8, 12898, 18, 27, 21, 4155, 8, 12898, 19, 21, 628, 4190, 18, 4865, 60, 800, 3726, 3726, 25, 80, 186, 161, 26, 14, 407, 505, 20, 44, 777, 20, 18324, 963, 7139, 27, 21, 972, 12898, 27, 21, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can CLIENT-CERT auth-method be used with a JDBC realm within tomcat? === Can CLIENT-CERT auth-method be used with a JDBC realm within tomcat? - What would the userRoleTable and userTable look like? - What would an example of the userNameCol, userCredCol, and roleNameCol look like?
0
[ 2, 92, 6819, 8, 17580, 10343, 96, 8, 5909, 1807, 43, 44, 147, 29, 21, 487, 43, 7229, 6640, 363, 2067, 5782, 60, 800, 3726, 3726, 92, 6819, 8, 17580, 10343, 96, 8, 5909, 1807, 43, 44, 147, 29, 21, 487, 43, 7229, 6640, 363, 2067...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Prevent Legacy Function Calls In VB.NET === Within Visual Studio 2008, what would be the easiest way to prevent usage of certain functions from being allowed? Specifically, I'm trying to prevent other developers from using "old school" VB6-style commands such as: - Len - LCase - UCase - Instr - InstrRev - Trim - Right - Left - Mid etc., etc., etc.... The list goes on and on. I can usually catch these during manual code review, but sometimes things will slip by. Also, it doesn't do anything about old code that doesn't typically get seen. I know education is probably the best tool, in the long run, but it would be nice to have something to supplement/enforce that.
0
[ 2, 2501, 7780, 1990, 3029, 19, 13, 20468, 9, 2328, 800, 3726, 3726, 363, 3458, 1120, 570, 15, 98, 83, 44, 14, 27237, 161, 20, 2501, 7514, 16, 1200, 3719, 37, 142, 1159, 60, 3524, 15, 31, 22, 79, 749, 20, 2501, 89, 10168, 37, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Breakpoint not hooked up when debugging in VS.Net 2005 === Been running into this problem lately... When debugging an app in VS.Net 2005, breakpoints are not connected. Error indicates that the compiled code is not the same as the running version and therefore there's a mismatch that causes the breakpoint to be disconnected. Cleaned solution of all bin file and re-compile doesn't help. Not just happening on a single box or person either.
0
[ 2, 1442, 3132, 52, 14988, 71, 76, 121, 16254, 2762, 19, 4611, 9, 2328, 812, 800, 3726, 3726, 74, 946, 77, 48, 1448, 10434, 9, 9, 9, 76, 121, 16254, 2762, 40, 4865, 19, 4611, 9, 2328, 812, 15, 1442, 3132, 18, 50, 52, 2587, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Where is the best place to re-learn graphics programming === Thinking in regards to Sliverlight, I would like to know where would be good places to go to get a refresher on 3d space, transforms, matrix manipulation, and all that good stuff.
0
[ 2, 113, 25, 14, 246, 209, 20, 302, 8, 413, 10818, 8351, 3143, 800, 3726, 3726, 1440, 19, 14179, 20, 27890, 3130, 15, 31, 83, 101, 20, 143, 113, 83, 44, 254, 1489, 20, 162, 20, 164, 21, 24905, 106, 27, 203, 43, 726, 15, 8007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
Can you call Directory.GetFiles() with multiple filters? === I am trying to use the Directory.GetFiles() method to retrieve a list of files of multiple types, such as mp3's and jpg's. I have tried both of the following with no luck: Directory.GetFiles("C:\\path", "*.mp3|*.jpg", SearchOption.AllDirectories); Directory.GetFiles("C:\\path", "*.mp3;*.jpg", SearchOption.AllDirectories); Is there a way to do this in one call?
0
[ 2, 92, 42, 645, 16755, 9, 3060, 16877, 18, 5, 6, 29, 1886, 21062, 60, 800, 3726, 3726, 31, 589, 749, 20, 275, 14, 16755, 9, 3060, 16877, 18, 5, 6, 2109, 20, 11917, 21, 968, 16, 6488, 16, 1886, 2551, 15, 145, 28, 4628, 240, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
IIS Connection Pool interrogation/leak tracking === Per this [helpful article](http://www.15seconds.com/issue/040830.htm) I have confirmed I have a connection pool leak in some application on my IIS 6 server running W2k3. The tough part is that I'm serving 300 websites written by 700 developers from this server in 6 application pools, 50% of which are .NET 1.1 which doesn't even show connections in the CLR Data performance counter. I could watch connections grow on my end if everything were .NET 2.0+, but I'm even out of luck on that slim monitoring tool. My 300 websites connect to probably 100+ databases spread out between Oracle, SQLServer and outliers, so I cannot watch the connections from the database end either. Right now my best and only plan is to do a loose binary search for my worst offenders. I will kill application pools and slowly remove applications from them until I find which individual applications result in the most connections dropping when I kill their pool. But since this is a production box and I like continued employment, this could take weeks as a tracing method. Does anyone know of a way to interrogate the IIS connection pools to learn their origin or owner? Is there an MSMQ trigger I might be able to which I might be able to attach when they are created? Anything silly I'm overlooking? Kevin (I'll include the error code to facilitate others finding your answers through search: Exception: System.InvalidOperationException Message: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.)
0
[ 2, 595, 18, 2760, 3067, 18388, 118, 413, 1378, 10353, 800, 3726, 3726, 416, 48, 636, 14593, 1566, 2002, 500, 5, 21127, 6903, 6483, 9, 1193, 5007, 18, 9, 960, 118, 12565, 118, 3277, 3099, 1762, 9, 9020, 79, 6, 31, 57, 2842, 31, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
LINQ to SQL Peculiarities === I'm encountering some peculiarities with LINQ to SQL. With a relatively simple query, I want to select some fields, but have the date fields formatted as strings, which I first achieved like this: var list = dataContext.MyLists.Single(x => x.ID == myId); var items = from i in list.MyItems select new { i.ID, i.Sector, i.Description, CompleteDate = i.CompleteDate.HasValue ? i.CompleteDate.Value.ToShortDateString() : "", DueDate = i.DueDate.HasValue ? i.DueDate.Value.ToShortDateString() : "" }; Later on I tried the following query, which is exactly the same, except I'm querying straight from my dataContext, rather than an element in my first query: var items = from i in dataContext.MyLists select new { i.ID, i.Sector, i.Description, CompleteDate = i.CompleteDate.HasValue ? i.CompleteDate.Value.ToShortDateString() : "", DueDate = i.DueDate.HasValue ? i.DueDate.Value.ToShortDateString() : "" }; The first one runs fine, yet the second query yields a: *Could not translate expression '...' into SQL and could not treat it as a local expression.* If I remove the lines that Format the date, it works fine. If I remove the .HasValue check it also works fine, until there are null values. Any ideas? Anthony
0
[ 2, 6294, 1251, 20, 4444, 255, 13193, 3808, 800, 3726, 3726, 31, 22, 79, 7007, 68, 109, 13193, 3808, 29, 6294, 1251, 20, 4444, 255, 9, 29, 21, 3109, 1935, 25597, 15, 31, 259, 20, 5407, 109, 2861, 15, 47, 57, 14, 1231, 2861, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
IIS6: 503 errors and CPU spikes === So, there is a horribly written site that I occasionally help out with that was originally written in classic ASP. It was then "ported" to ASP.NET by moving the global variables to the code behind and leaving the rest of the code in the aspx...Its a huge mess. On some pages, an occasional race condition seems to be triggered that causes IIS6 to die (returns 503 errors) and spikes the CPU to 100%. We set up some monitoring tools and recycle the apppool when this happens to keep the site stable, but this is just a bandaid. Does anyone know of any tools to get me pointed in the right direction for finding why this happens? Memory usage remains flat, so its not a leaking reference issue.
0
[ 2, 595, 18, 379, 45, 1222, 240, 11908, 17, 17578, 6734, 18, 800, 3726, 3726, 86, 15, 80, 25, 21, 28441, 642, 689, 30, 31, 4533, 448, 70, 29, 30, 23, 912, 642, 19, 2732, 28, 306, 9, 32, 23, 94, 13, 7, 1993, 69, 7, 20, 28, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I use a String as a Stream in .Net? === I need to call a method that accepts a stream argument. The method loads text into the stream, which would normally be a file. I'd like to simply populate a string with the contents of the stream, instead of writing it to a file. How do I do this?
0
[ 2, 184, 107, 31, 275, 21, 3724, 28, 21, 3766, 19, 13, 9, 2328, 60, 800, 3726, 3726, 31, 376, 20, 645, 21, 2109, 30, 16548, 21, 3766, 5476, 9, 14, 2109, 19069, 1854, 77, 14, 3766, 15, 56, 83, 4147, 44, 21, 3893, 9, 31, 22, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I test if a given BSP tree is optimal? === I have a polygon soup of triangles that I would like to construct a BSP tree for. My current program simply constructs a BSP tree by inserting a random triangle from the model one at a time until all the triangles are consumed, then it checks the depth and breadth of the tree and remembers the best score it achieved (lowest depth, lowest breadth). By definition, the best depth would be log2(n) (or less if co-planar triangles are grouped?) where n is the number of triangles in my model, and the best breadth would be n (meaning no splitting has occurred). But, there are certain configurations of triangles for which this pinnacle would never be reached. Is there an efficient test for checking the quality of my BSP tree? Specifically, I'm trying to find a way for my program to know it should stop looking for a more optimal construction.
0
[ 2, 184, 107, 31, 1289, 100, 21, 504, 334, 3401, 1541, 25, 17586, 60, 800, 3726, 3726, 31, 57, 21, 21309, 11554, 16, 8676, 18, 30, 31, 83, 101, 20, 6960, 21, 334, 3401, 1541, 26, 9, 51, 866, 625, 1659, 6960, 18, 21, 334, 3401, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Bug number comments === Why would you add > //Bug 1024 comments into a source controlled code base? Most bug tracking and source control systems are better equipted to keep track of this information. In source control, a label or comment can be used with the checkin. In a bug tracker the revision number can be added to the bug's resolution. So why comment the code? Especial since these comments relevancy is very short lived and they tend to build up littering the code base.
0
[ 2, 6256, 234, 7534, 800, 3726, 3726, 483, 83, 42, 3547, 13, 1, 12894, 16254, 332, 1996, 7534, 77, 21, 1267, 3959, 1797, 1000, 60, 127, 6256, 10353, 17, 1267, 569, 1242, 50, 574, 24270, 1427, 20, 643, 792, 16, 48, 676, 9, 19, 126...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Where can I find a List of Standard HTTP Header Values? === I'm looking for a list of the standard values a web-server can expect from the browser. I'm talking about things like what to expect in the "user-agent" field and so forth.
0
[ 2, 113, 92, 31, 477, 21, 968, 16, 1236, 7775, 157, 106, 4070, 60, 800, 3726, 3726, 31, 22, 79, 699, 26, 21, 968, 16, 14, 1236, 4070, 21, 2741, 8, 10321, 106, 92, 4186, 37, 14, 16495, 9, 31, 22, 79, 1582, 88, 564, 101, 98, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Sql Server equivalent to Oracle's CREATE OR REPLACE VIEW === In Oracle, I can re-create a view with a single statement, as shown here: CREATE OR REPLACE VIEW MY_VIEW AS SELECT SOME_FIELD FROM SOME_TABLE WHERE SOME_CONDITIONS As the syntax implies, this will drop the old view and re-create it with whatever definition I've given. Is there an equivalent in SQL Server 2005 that will do the same thing?
0
[ 2, 4444, 255, 8128, 4602, 20, 15759, 22, 18, 1600, 54, 3934, 1418, 800, 3726, 3726, 19, 15759, 15, 31, 92, 302, 8, 6037, 1373, 21, 1418, 29, 21, 345, 3331, 15, 28, 1721, 235, 45, 1600, 54, 3934, 1418, 51, 1, 4725, 28, 5407, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
On 32-bit CPUs, is an 'integer' type more efficient than a 'short' type? === On a 32-bit CPU, an integer is 4 bytes and a short integer is 2 bytes. If I am writing a C/C++ application that uses many numeric values that will always fit within the provided range of a short integer, is it more efficient to use 4 byte integers or 2 byte integers? I have heard it suggested that 4 byte integers are more efficient as this fits the bandwidth of the bus from memory to the CPU. However, if I am adding together two short integers, would the CPU package both values in a single pass in parallel (thus spanning the 4 byte bandwidth of the bus)?
0
[ 2, 27, 2512, 8, 3326, 17578, 18, 15, 25, 40, 13, 22, 6391, 13699, 22, 1001, 91, 8243, 119, 21, 13, 22, 10849, 22, 1001, 60, 800, 3726, 3726, 27, 21, 2512, 8, 3326, 17578, 15, 40, 13820, 25, 268, 34, 3231, 17, 21, 502, 13820, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What do you need to take into consideration when deciding between MySQL and Amazon's SimpleDB for a RoR app? === I am just beginning to do research into the feasibility of using Amazon's SimpleDB service as the datastore for RoR application I am planning to build. We will be using EC2 for the web server, and had planned to also use EC2 for the MySQL servers. But now the question is, why not use SimpleDB? The application will (if successful) need to be very scalable in terms of # of users supported, will need to maintain a simple and efficient code base, and will need to be reliable. I'm curious as to what the SO communities thoughts are on this.
0
[ 2, 98, 107, 42, 376, 20, 247, 77, 9888, 76, 11211, 128, 51, 18, 22402, 17, 8059, 22, 18, 1935, 9007, 26, 21, 761, 248, 4865, 60, 800, 3726, 3726, 31, 589, 114, 997, 20, 107, 527, 77, 14, 26022, 16, 568, 8059, 22, 18, 1935, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I ignore a directory in mod_rewrite? === I'm trying to have the modrewrite rules skip the directory 'vip'. I've tried a number of things as you can see below, but to no avail. Where am I going wrong? # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / #RewriteRule ^vip$ - [PT] RewriteRule ^vip/.$ - [PT] #RewriteCond %{REQUEST_URI} !/vip RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
0
[ 2, 184, 107, 31, 7174, 21, 16755, 19, 7226, 1, 99, 23716, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 57, 14, 7226, 99, 23716, 1761, 12532, 14, 16755, 13, 22, 1755, 306, 22, 9, 31, 22, 195, 794, 21, 234, 16, 564, 28, 42, 92, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best Way To Get All Dates Between DateA and DateB === I am using an asp:Calander and I have an object that has a beginning date and an ending date. I need to get all the dates between these two dates and place them in an array so i can then render corresponding dates on the calander with different CSS
0
[ 2, 246, 161, 20, 164, 65, 4076, 128, 1231, 58, 17, 1231, 220, 800, 3726, 3726, 31, 589, 568, 40, 28, 306, 45, 793, 10313, 17, 31, 57, 40, 3095, 30, 63, 21, 997, 1231, 17, 40, 3119, 1231, 9, 31, 376, 20, 164, 65, 14, 4076, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Weird results using P4COM === I'm using P4COM to communicate with our perforce server. I have written an little utility to simplify our QA of what files have changed from one release to another. I have been using the P4COM interface from Delphi. So far so good. I though it might be nice to allow users to view the diff between the two versions of the file from within my little utility rather than going back to p4v. So I print (get) the files at each revision using p4COM and the following command >print -o "E:\Development\TempProjects\p4Changes\temp\File_dispatch.pas#25" "//depot/mydepotpath/File_dispatch.pas"#25 and >print -o "E:\Development\TempProjects\p4Changes\temp\File_dispatch.pas#26" "//depot/mydepotpath/File_dispatch.pas"#26 However when I do this from my app using P4COM I seem to get random files (and they appear to be deleted ones). If I run the exact same command from the command line I get perfect results. Running both of these does return a file and correctly dumps it to disk where I want it, its just not the file I've asked for. Any ideas?
0
[ 2, 5455, 1736, 568, 351, 300, 960, 800, 3726, 3726, 31, 22, 79, 568, 351, 300, 960, 20, 8709, 29, 318, 416, 8774, 8128, 9, 31, 57, 642, 40, 265, 10082, 20, 28257, 318, 7234, 16, 98, 6488, 57, 1015, 37, 53, 830, 20, 226, 9, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Slicing a multi-dimensional PHP array across one of it's elements. === Say for example you just queried a database and you recieved this 2D array. $results = array( array('id' => 1, 'name' => 'red' , 'spin' => 1), array('id' => 2, 'name' => 'green', 'spin' => -1), array('id' => 3, 'name' => 'blue' , 'spin' => .5) ); I often find myself writing loops like this. foreach($results as $result) $names[] = $result['name']; My questions is does there exist a way to get this array $names without using a loop? Using callback functions count as using a loop. Here is a more generic example of getting every field. foreach($results as $result) foreach($result as $key => $value) $fields[$key][] = $value;
0
[ 2, 27646, 21, 1889, 8, 7865, 13, 26120, 7718, 464, 53, 16, 32, 22, 18, 2065, 9, 800, 3726, 3726, 395, 26, 823, 42, 114, 9386, 11942, 21, 6018, 17, 42, 302, 10486, 4763, 48, 172, 43, 7718, 9, 5579, 29955, 18, 800, 7718, 5, 7718...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I read all feed items? === I want to read all items of a feed in C#. The solutions I've found are only for the latest items like just the last 10 days. Anybody has a good solution fot this? Thank you
0
[ 2, 184, 107, 31, 1302, 65, 4063, 3755, 60, 800, 3726, 3726, 31, 259, 20, 1302, 65, 3755, 16, 21, 4063, 19, 272, 5910, 9, 14, 6776, 31, 22, 195, 216, 50, 104, 26, 14, 5736, 3755, 101, 114, 14, 236, 332, 509, 9, 11181, 63, 21,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
Subquery in an IN() clause causing error === I'm on SQL Server 2005 and I am getting an error which I am pretty sure should not be getting. Msg 512, Level 16, State 1, Procedure spGetSavedSearchesByAdminUser, Line 8 Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. I am following the example# B on this MSDN link: [http://msdn.microsoft.com/en-us/library/ms177682(SQL.90).aspx][1] My stored proc code is as follows. I can simplify it for the sake of this post if you request so: ALTER PROCEDURE [dbo].[spGetSavedSearchesByAdminUser] @strUserName varchar(50) ,@bitQuickSearch bit = 0 AS BEGIN SELECT [intSearchID] ,strSearchTypeCode ,[strSearchName] FROM [tblAdminSearches] WHERE strUserName = @strUserName AND strSearchTypeCode IN ( CASE @bitQuickSearch WHEN 1 THEN 'Quick' ELSE (SELECT strSearchTypeCode FROM tblAdvanceSearchTypes) END ) ORDER BY strSearchName END I have checked there is no datatype mismatch between the resultset from the subquery and the strSearchTypeCode the subquery result is compared with. I see no reason why this should not work. If you have any clues then please let me know. Thanks in advance. Aamir [1]: http://msdn.microsoft.com/en-us/library/ms177682(SQL.90).aspx
0
[ 2, 972, 8190, 93, 19, 40, 19, 5, 6, 9040, 3242, 7019, 800, 3726, 3726, 31, 22, 79, 27, 4444, 255, 8128, 812, 17, 31, 589, 1017, 40, 7019, 56, 31, 589, 1772, 562, 378, 52, 44, 1017, 9, 4235, 263, 331, 918, 15, 662, 347, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Regular expresion to match urls JAVA === I use RegexBuddy while working with regular expressions. From its library i copied the regular expression to match urls. I tested succesfully within regexbuddy. However, when I copied it as Javas String flavor and pasted it into java code it does not work. The next class prints false: public class RegexFoo { public static void main(String[] args) { String regex = "\\b(https?|ftp|file)://[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|]"; String text = "http://google.com"; System.out.println(IsMatch(text,regex)); } private static boolean IsMatch(String s, String pattern) { try { Pattern patt = Pattern.compile(pattern); Matcher matcher = patt.matcher(s); return matcher.matches(); } catch (RuntimeException e) { return false; } } } Does anyone what i am doing wrong?
0
[ 2, 1290, 1396, 11973, 872, 20, 730, 13, 911, 7532, 8247, 800, 3726, 3726, 31, 275, 7953, 1706, 220, 28085, 133, 638, 29, 1290, 13832, 9, 37, 82, 1248, 31, 18225, 14, 1290, 1803, 20, 730, 13, 911, 7532, 9, 31, 7631, 21792, 5052, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I create an Excel chart that pulls data from multiple sheets? === I have monthly sales figures stored in separate sheets. I would like to create a plot of sales for multiple products per month. Each product would be represented in a different colored line on the same chart with each month running along the x axis. What is the best way to create a single line chart that pulls from the same relative cells on multiple sheets?
0
[ 2, 184, 107, 31, 1600, 40, 20700, 1795, 30, 8071, 1054, 37, 1886, 8801, 60, 800, 3726, 3726, 31, 57, 6460, 2598, 2957, 8214, 19, 1725, 8801, 9, 31, 83, 101, 20, 1600, 21, 3798, 16, 2598, 26, 1886, 1985, 416, 1617, 9, 206, 2374, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to setup VS2008 for efficient C++ development === Normally I program in C# but have been forced to do some work in C++. It seems that the integration with Visual Studio (2008) is really poor compared to C# but I was wondering if there are any good tools, plugins or configurations that can improve the situation. Another post pointed out the program Visual Assist X, which at least helps with some things such as refactoring (though it is a bit expensive for me). My major problem is, though, that the compile errors give little clue about what is wrong and I spend most of my time figuring out what I did wrong. It just feels like it is possibly to statically check for a lot more errors than VS does out of the box. And why doesn't it provide the blue underlines as with C#, that shouldn't be too hard?! I realize that half the problem is just the fact that I am new to C++ but I really feel that it can be unreasonably hard to get a program to compile. Are there any tools of this sort out there or are my demands too high?
0
[ 2, 184, 20, 18161, 4611, 2753, 26, 8243, 272, 20512, 522, 800, 3726, 3726, 4147, 31, 625, 19, 272, 5910, 47, 57, 74, 1292, 20, 107, 109, 170, 19, 272, 20512, 9, 32, 2206, 30, 14, 8078, 29, 3458, 1120, 13, 5, 2753, 6, 25, 510, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I make a C++ macro behave like a function? === Let's say that for some reason you need to write a macro: <code>MACRO(X,Y)</code>. (Let's assume there's a good reason you can't use an inline function.) You want this macro to emulate a call to a function with no return value. --- <h4>Example 1: This should work as expected.</h4> if (x > y) MACRO(x, y); do_something(); <h4>Example 2: This should not result in a compiler error.</h4> if (x > y) MACRO(x, y); else MACRO(y - x, x - y); <h4>Example 3: This should <em>not</em> compile.</h4> do_something(); MACRO(x, y) do_something(); --- The naïve way to write the macro is like this: #define MACRO(X,Y) \ cout << "1st arg is:" << (X) << endl; \ cout << "2nd arg is:" << (Y) << endl; \ cout << "Sum is:" << ((X)+(Y)) << endl; This is a very bad solution which fails all three examples, and I shouldn't need to explain why. --- Now, the way I most often see macros written is to enclose them in curly braces, like this: #define MACRO(X,Y) \ { \ cout << "1st arg is:" << (X) << endl; \ cout << "2nd arg is:" << (Y) << endl; \ cout << "Sum is:" << ((X)+(Y)) << endl; \ } This solves example 1, because the macro is in one statement block. But example 2 is broken because we put a semicolon after the call to the macro. This makes the compiler think the semicolon is a statement by itself, which means the else statement doesn't correspond to any if statement! And lastly, example 3 compiles OK, even though there is no semicolon, because a code block doesn't need a semicolon. --- Is there a way to write a macro so that it pass all three examples? --- <i>Note: I am submitting my own answer as part of the <a href="http://stackoverflow.com/questions/162246/is-stack-overflow-appropriate-for-sharing-knowledge-tips-tricks-and-interesting">accepted way of sharing a tip</a>, but if anyone has a better solution feel free to post it here, it may get more votes than my method. :)</i>
0
[ 2, 184, 107, 31, 233, 21, 272, 20512, 9069, 14149, 101, 21, 1990, 60, 800, 3726, 3726, 408, 22, 18, 395, 30, 26, 109, 1215, 42, 376, 20, 2757, 21, 9069, 45, 13, 1, 9375, 1, 540, 7638, 5, 396, 15, 93, 6, 1, 118, 9375, 1, 9,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Error Updating a record === I get a mysql error: **#update (ActiveRecord::StatementInvalid) "Mysql::Error: #HY000Got error 139 from storage engine:** When trying to update a record, any ideas on how to track down the problem?
0
[ 2, 7019, 71, 43, 1880, 21, 571, 800, 3726, 3726, 31, 164, 21, 51, 18, 22402, 7019, 45, 13, 1409, 5910, 576, 8209, 13, 5, 7889, 14953, 45, 45, 3859, 1130, 108, 18506, 43, 6, 13, 7, 915, 18, 22402, 45, 45, 29992, 45, 6926, 5608,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Windows VPN connection ports. === I'm trying to connect to my workplace using a VPN connection, however I'm behind a firewall and I need to know what ports the connection will use to ask the network adiministrator to open them. I'm using Windows Vista and the VPN Server runs on a Windows 2003 Server machine.
2
[ 2, 1936, 13, 10924, 103, 2760, 9551, 9, 800, 3726, 3726, 31, 22, 79, 749, 20, 6379, 20, 51, 16932, 568, 21, 13, 10924, 103, 2760, 15, 207, 31, 22, 79, 439, 21, 535, 6051, 17, 31, 376, 20, 143, 98, 9551, 14, 2760, 129, 275, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Type mismatch for Class Generics === I have the following code that won't compile and although there is a way to make it compile I want to understand why it isn't compiling. Can someone enlighten me as to specifically why I get the error message I will post at the end please? public class Test { public static void main(String args[]) { Test t = new Test(); t.testT(null); } public <T extends Test> void testT(Class<T> type) { Class<T> testType = type == null ? Test.class : type; //Error here System.out.println(testType); } } Type mismatch: cannot convert from Class<capture#1-of ? extends Test> to Class<T> By casting `Test.class` to `Class<T>` this compiles with an `Unchecked cast` warning and runs perfectly.
0
[ 2, 1001, 2462, 12280, 26, 718, 12733, 18, 800, 3726, 3726, 31, 57, 14, 249, 1797, 30, 230, 22, 38, 26561, 17, 419, 80, 25, 21, 161, 20, 233, 32, 26561, 31, 259, 20, 1369, 483, 32, 2532, 22, 38, 24378, 9, 92, 737, 1957, 3130, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Logging conventions === What conventions do you use for log categories in log4j or similar libraries ? Usually you see class names as categories, but have you used other systems ? What about log levels ? What levels do you use and in which case ?
0
[ 2, 13, 13919, 15117, 800, 3726, 3726, 98, 15117, 107, 42, 275, 26, 6738, 6422, 19, 6738, 300, 728, 54, 835, 8649, 13, 60, 951, 42, 196, 718, 1817, 28, 6422, 15, 47, 57, 42, 147, 89, 1242, 13, 60, 98, 88, 6738, 2216, 13, 60, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...