PostId
int64
4
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
1
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-55
461k
OwnerUndeletedAnswerCountAtPostTime
int64
0
21.5k
Title
stringlengths
3
250
BodyMarkdown
stringlengths
5
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
25,566
08/25/2008 02:05:54
2,775
08/25/2008 01:49:22
6
0
How do I write a sort worse than O(n!)
I wrote an O(n!) sort for my amusement that can't be trivially optimized to run faster without replacing it entirely. [And no, I didn't just randomize the items until they were sorted]. How might I write an even worse Big-O sort, without just adding extraneous junk that could be pulled out to reduce the time complexity? [http://en.wikipedia.org/wiki/Big_O_notation][1] has various time complexities sorted in growing order. [1]: http://en.wikipedia.org/wiki/Big_O_notation#Orders_of_common_functions
interviewquestion
madscientist
evilgenius
amusement
null
null
open
How do I write a sort worse than O(n!) === I wrote an O(n!) sort for my amusement that can't be trivially optimized to run faster without replacing it entirely. [And no, I didn't just randomize the items until they were sorted]. How might I write an even worse Big-O sort, without just adding extraneous junk that could be pulled out to reduce the time complexity? [http://en.wikipedia.org/wiki/Big_O_notation][1] has various time complexities sorted in growing order. [1]: http://en.wikipedia.org/wiki/Big_O_notation#Orders_of_common_functions
0
25,614
08/25/2008 03:11:58
1,432
08/15/2008 15:33:54
795
31
Which Java DOM Wrapper is the Best or Most Popular?
I've used jdom in the past, and have looked briefly at XOM and DOM4j. Each seems to provide essentially the same thing, as they each provide a simplified wrapper over the (very obtuse) standard W3C DOM APIs. I know that JDOM went through some effort to develop a JSR and standardization process at one point, but as far as I know that effort never went anywhere. All of the project appear to be in stasis with little new development in the past several years. Is there a consensus as to which is the best? Also what are the pros and cons of each?
java
xml
dom
null
null
07/12/2012 13:06:12
not constructive
Which Java DOM Wrapper is the Best or Most Popular? === I've used jdom in the past, and have looked briefly at XOM and DOM4j. Each seems to provide essentially the same thing, as they each provide a simplified wrapper over the (very obtuse) standard W3C DOM APIs. I know that JDOM went through some effort to develop a JSR and standardization process at one point, but as far as I know that effort never went anywhere. All of the project appear to be in stasis with little new development in the past several years. Is there a consensus as to which is the best? Also what are the pros and cons of each?
4
25,636
08/25/2008 03:57:45
1,662
08/17/2008 20:30:20
161
8
What is the best way to learn Assembly? Specifically, for someone who has experience in dynamic languages.
I've been using Python for quite some time now, and I absolutely love the ease of use and flexibility, but I really want to get closer to the hardware for some iter mathematics that I'm working on. I'm also intrigued by being so close to the hardware, with absolutely nothing holding you back from using everything it has. I've researched for introductions to Assembly and to me they go much faster than they should. They jump straight into registers and operations without explaining what exactly they are, and why they matter. I'd love to see an in-depth introduction to Assembly, to make sure you understand the concepts before proceeding to any kind of programming with it.
tutorials
guide
null
null
null
05/30/2012 13:09:29
not constructive
What is the best way to learn Assembly? Specifically, for someone who has experience in dynamic languages. === I've been using Python for quite some time now, and I absolutely love the ease of use and flexibility, but I really want to get closer to the hardware for some iter mathematics that I'm working on. I'm also intrigued by being so close to the hardware, with absolutely nothing holding you back from using everything it has. I've researched for introductions to Assembly and to me they go much faster than they should. They jump straight into registers and operations without explaining what exactly they are, and why they matter. I'd love to see an in-depth introduction to Assembly, to make sure you understand the concepts before proceeding to any kind of programming with it.
4
25,637
08/25/2008 04:01:40
2,598
08/23/2008 13:13:34
11
1
Shutting down a computer using Java
Is there a way to shutdown a computer using a built-in Java function?
java
null
null
null
null
null
open
Shutting down a computer using Java === Is there a way to shutdown a computer using a built-in Java function?
0
25,642
08/25/2008 04:04:48
615
08/07/2008 11:06:07
1,337
74
When is NavigationService initialized?
I want to catch the NavigationService.Navigating event from my Page, to prevent the user from navigating forward. I have an event handler defined thusly: void PreventForwardNavigation(object sender, NavigatingCancelEventArgs e) { if (e.NavigationMode == NavigationMode.Forward) { e.Cancel = true; } } ... and that works fine. However, I am unsure exactly where to place this code: NavigationService.Navigating += PreventForwardNavigation; If I place it in the constructor of the page, or the Initialized event handler, then NavigationService is still null and I get a NullReferenceException. However, if I place it in the Loaded event handler for the Page, then it is called every time the page is navigated to. If I understand right, that means I'm handling the same event multiple times. Am I ok to add the same handler to the event multiple times (as would happen were I to use the page's Loaded event to hook it up)? If not, is there some place in between Initialized and Loaded where I can do this wiring?
.net
wpf
navigation
null
null
null
open
When is NavigationService initialized? === I want to catch the NavigationService.Navigating event from my Page, to prevent the user from navigating forward. I have an event handler defined thusly: void PreventForwardNavigation(object sender, NavigatingCancelEventArgs e) { if (e.NavigationMode == NavigationMode.Forward) { e.Cancel = true; } } ... and that works fine. However, I am unsure exactly where to place this code: NavigationService.Navigating += PreventForwardNavigation; If I place it in the constructor of the page, or the Initialized event handler, then NavigationService is still null and I get a NullReferenceException. However, if I place it in the Loaded event handler for the Page, then it is called every time the page is navigated to. If I understand right, that means I'm handling the same event multiple times. Am I ok to add the same handler to the event multiple times (as would happen were I to use the page's Loaded event to hook it up)? If not, is there some place in between Initialized and Loaded where I can do this wiring?
0
25,646
08/25/2008 04:11:49
1,329,401
08/25/2008 03:16:36
1
0
What could prevent OpenGL glDrawPixels from working on some video cards?
The following code writes no data to the back buffer on Intel integrated video cards,for example, on a MacBook. On ATI cards, such as in the iMac, it draws to the back buffer. The width and height are correct (and 800x600 buffer) and m_PixelBuffer is correctly filled with 0xAA00AA00. My best guess so far is that there is something amiss with needing glWindowPos set. I do not currently set it, and when I get GL_CURRENT_RASTER_POSITION I noticed that the default on the ATI card is 0,0,0,0 and the Intel it's 0,0,0,1. When I set the raster pos on the ATI card to 0,0,0,1 I get the same result as the Intel card, nothing drawn to the back buffer. Is there some transform state I'm missing? glDrawPixels(GetBufferWidth(), GetBufferHeight(), GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, m_PixelBuffer);
opengl
osx
null
null
null
null
open
What could prevent OpenGL glDrawPixels from working on some video cards? === The following code writes no data to the back buffer on Intel integrated video cards,for example, on a MacBook. On ATI cards, such as in the iMac, it draws to the back buffer. The width and height are correct (and 800x600 buffer) and m_PixelBuffer is correctly filled with 0xAA00AA00. My best guess so far is that there is something amiss with needing glWindowPos set. I do not currently set it, and when I get GL_CURRENT_RASTER_POSITION I noticed that the default on the ATI card is 0,0,0,0 and the Intel it's 0,0,0,1. When I set the raster pos on the ATI card to 0,0,0,1 I get the same result as the Intel card, nothing drawn to the back buffer. Is there some transform state I'm missing? glDrawPixels(GetBufferWidth(), GetBufferHeight(), GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, m_PixelBuffer);
0
25,652
08/25/2008 04:19:25
2,140
08/20/2008 14:26:00
21
1
Height of NSTextView with one line?
I want to programatically create an NSTextView. How can I determine the correct frame height so that the view displays one line of text in the current default font?
osx
cocoa
null
null
null
null
open
Height of NSTextView with one line? === I want to programatically create an NSTextView. How can I determine the correct frame height so that the view displays one line of text in the current default font?
0
25,653
08/25/2008 04:21:05
364
08/05/2008 05:33:41
324
21
Hide a column in ASP.NET Dynamic Data
Is there any way to apply an attribute to a model file in ASP.NET Dynamic Data to hide the column? For instance, I can currently set the display name of a column like this: [DisplayName("Last name")] public object Last_name { get; set; } Is there a similar way to hide a column?
asp.net
dynamicdata
null
null
null
null
open
Hide a column in ASP.NET Dynamic Data === Is there any way to apply an attribute to a model file in ASP.NET Dynamic Data to hide the column? For instance, I can currently set the display name of a column like this: [DisplayName("Last name")] public object Last_name { get; set; } Is there a similar way to hide a column?
0
25,661
08/25/2008 04:36:48
2,772
08/25/2008 00:21:04
1
0
pyGame within a pyGTK application
What is the best way to use PyGame (SDL) within a PyGTK application? I'm searching for a method that allows me to have a drawing area in the GTK window and at the same time being able to manage both GTK and SDL events.
python
pygame
pygtk
null
null
null
open
pyGame within a pyGTK application === What is the best way to use PyGame (SDL) within a PyGTK application? I'm searching for a method that allows me to have a drawing area in the GTK window and at the same time being able to manage both GTK and SDL events.
0
25,665
08/25/2008 04:44:06
1,448
08/15/2008 16:16:35
134
16
Python module for converting PDF to text
Is there any python module to convert PDF files into text? I tried [one piece of code][1] found in Activestate which uses pypdf but the text generated had no space between and was of no use. [1]: http://code.activestate.com/recipes/511465/
python
pdf
null
null
null
04/14/2012 13:56:30
not constructive
Python module for converting PDF to text === Is there any python module to convert PDF files into text? I tried [one piece of code][1] found in Activestate which uses pypdf but the text generated had no space between and was of no use. [1]: http://code.activestate.com/recipes/511465/
4
25,707
08/25/2008 06:06:42
5
07/31/2008 14:22:31
2,259
93
How do you track your hours?
Every programming job I've had has required me to track my hours, entering them into a system once a week. I've never been good at it. For the past few years, I've been running [Timesnapper][1]* on all my machines, and on the night before hours were checked I'd slog through the records and painstakingly enter the hours in. The alternative, of course, is to enter the time as I work, but I've never been able to stick to that. I get busy, or in the zone, and I forget about it. What do you recommend? *Timesnapper has some timesheet integration, but I haven't been able to get it to work with my development work, since some of my time spent browsing the web is development related, while some of it isn't. [1]: http://timesnapper.com
productivity
null
null
null
null
02/15/2011 15:38:56
off topic
How do you track your hours? === Every programming job I've had has required me to track my hours, entering them into a system once a week. I've never been good at it. For the past few years, I've been running [Timesnapper][1]* on all my machines, and on the night before hours were checked I'd slog through the records and painstakingly enter the hours in. The alternative, of course, is to enter the time as I work, but I've never been able to stick to that. I get busy, or in the zone, and I forget about it. What do you recommend? *Timesnapper has some timesheet integration, but I haven't been able to get it to work with my development work, since some of my time spent browsing the web is development related, while some of it isn't. [1]: http://timesnapper.com
2
25,730
08/25/2008 07:31:46
2,666
08/24/2008 07:53:48
1
0
What is the best free memory leak detector for a C/C++ program and its plug-in DLLs?
I have a .exe and many plug-in .dll modules that the .exe loads. (I have source for both.) A cross-platform (with source) solution would be ideal, but the platform can be narrowed to WinXP and Visual Studio (7.1/2003 in my case). The built-in VS leak detector only gives the line where new/malloc was called from, but I have a wrapper for allocations, so a full symbolic stack trace would be best. The detector would also be able to detect for a leak in both the .exe and its accompanying plug-in .dll modules.
c++
c
memory-leaks
null
null
null
open
What is the best free memory leak detector for a C/C++ program and its plug-in DLLs? === I have a .exe and many plug-in .dll modules that the .exe loads. (I have source for both.) A cross-platform (with source) solution would be ideal, but the platform can be narrowed to WinXP and Visual Studio (7.1/2003 in my case). The built-in VS leak detector only gives the line where new/malloc was called from, but I have a wrapper for allocations, so a full symbolic stack trace would be best. The detector would also be able to detect for a leak in both the .exe and its accompanying plug-in .dll modules.
0
25,746
08/25/2008 07:54:29
2,799
08/25/2008 07:54:29
1
0
What's the difference between a string constant and a string literal?
I'm learning objective-C and Cocoa and have come across this statement: > The Cocoa frameworks expect that global string constants rather than string literals are used for dictionary keys, notification and exception names, and some method parameters that take strings. I've only worked in higher level languages so have never had to consider the details of strings that much. What's the difference between a string constant and string literal?
c
string
objectivec
null
null
null
open
What's the difference between a string constant and a string literal? === I'm learning objective-C and Cocoa and have come across this statement: > The Cocoa frameworks expect that global string constants rather than string literals are used for dictionary keys, notification and exception names, and some method parameters that take strings. I've only worked in higher level languages so have never had to consider the details of strings that much. What's the difference between a string constant and string literal?
0
25,749
08/25/2008 07:57:59
2,799
08/25/2008 07:54:29
1
0
What does the @ symbol represent in objective-c?
I'm learning objective-c and keep bumping into the @ symbol. It is used in different scenarios, for example at the start of a string or to synthesise accessor methods. What's does the @ symbol mean in objective-c?
objectivec
null
null
null
null
null
open
What does the @ symbol represent in objective-c? === I'm learning objective-c and keep bumping into the @ symbol. It is used in different scenarios, for example at the start of a string or to synthesise accessor methods. What's does the @ symbol mean in objective-c?
0
25,752
08/25/2008 08:02:43
31,505
2008-09-01
476
23
[HTML] How to put space character before option text in a select element?
In a drop down list, I need to add spaces in front of the options in the list. I am trying <select> <option>&#32;&#32;Sample</option> </select> for adding two spaces but it displays no spaces. How can I add spaces before option texts?
html
html-select
null
null
null
null
open
[HTML] How to put space character before option text in a select element? === In a drop down list, I need to add spaces in front of the options in the list. I am trying <select> <option>&#32;&#32;Sample</option> </select> for adding two spaces but it displays no spaces. How can I add spaces before option texts?
0
25,765
08/25/2008 08:17:54
1,448,983
08/11/2008 14:25:34
21
2
Java Configuration framework
I'm in the process of weeding out all hardcoded values in a java library and was wondering what framework would be the best (in terms of zero- or close-to-zero configuration) to handle run-time configuration? I would prefer xml-based config-files, but it's not essential. Please do only reply if you have practical experience with a framework. I'm not looking for examples, but experience... Thanks for taking the time.
java
configuration
configurationmanager
xml
null
null
open
Java Configuration framework === I'm in the process of weeding out all hardcoded values in a java library and was wondering what framework would be the best (in terms of zero- or close-to-zero configuration) to handle run-time configuration? I would prefer xml-based config-files, but it's not essential. Please do only reply if you have practical experience with a framework. I'm not looking for examples, but experience... Thanks for taking the time.
0
25,767
08/25/2008 08:23:14
115
08/02/2008 05:44:40
307
48
What is the most effiecent to get data from the database to session
What is the quickest way to get a large amount of data (think golf) and the most efficient (think performance) to get a large amount of data from a MySQL database to a session without having to continue doing what I already have: $sql = "SELECT * FROM users WHERE username='" . mysql_escape_string($_POST['username']) . "' AND password='" . mysql_escape_string(md5($_POST['password'])) . "'"; $result = mysql_query($sql, $link) or die("There was an error while trying to get your information.\n<!--\n" . mysql_error($link) . "\n-->"); if(mysql_num_rows($result) < 1) { $_SESSION['username'] = $_POST['username']; redirect('index.php?p=signup'); } $_SESSION['id'] = mysql_result($result, '0', 'id'); $_SESSION['fName'] = mysql_result($result, '0', 'fName'); $_SESSION['lName'] = mysql_result($result, '0', 'lName'); ... And before anyone asks yes I do really need to 'SELECT *'
php
mysql
sessions
null
null
null
open
What is the most effiecent to get data from the database to session === What is the quickest way to get a large amount of data (think golf) and the most efficient (think performance) to get a large amount of data from a MySQL database to a session without having to continue doing what I already have: $sql = "SELECT * FROM users WHERE username='" . mysql_escape_string($_POST['username']) . "' AND password='" . mysql_escape_string(md5($_POST['password'])) . "'"; $result = mysql_query($sql, $link) or die("There was an error while trying to get your information.\n<!--\n" . mysql_error($link) . "\n-->"); if(mysql_num_rows($result) < 1) { $_SESSION['username'] = $_POST['username']; redirect('index.php?p=signup'); } $_SESSION['id'] = mysql_result($result, '0', 'id'); $_SESSION['fName'] = mysql_result($result, '0', 'fName'); $_SESSION['lName'] = mysql_result($result, '0', 'lName'); ... And before anyone asks yes I do really need to 'SELECT *'
0
25,785
08/25/2008 08:37:03
797
08/09/2008 02:14:04
227
10
Delete all but the most recent X files in bash
Is there a simple way, in a pretty standard UNIX environment with bash, to run a command to delete all but the most recent X files from a directory? To give a bit more of a concrete example, imagine some cron job writing out a file (say, a log file or a tar-ed up backup) to a directory every hour. I'd like a way to have another cron job running which would remove the oldest files in that directory until there are less than, say, 5. And just to be clear, there's only one file present, it should never be deleted.
unix
bash
scripting
null
null
null
open
Delete all but the most recent X files in bash === Is there a simple way, in a pretty standard UNIX environment with bash, to run a command to delete all but the most recent X files from a directory? To give a bit more of a concrete example, imagine some cron job writing out a file (say, a log file or a tar-ed up backup) to a directory every hour. I'd like a way to have another cron job running which would remove the oldest files in that directory until there are less than, say, 5. And just to be clear, there's only one file present, it should never be deleted.
0
25,794
08/25/2008 08:47:27
211
08/03/2008 14:56:28
1
1
MySQL copy/duplicate database
What is the best way to duplicate a mysql db into another without using mysqldump? With content and without content. I am currently using mysql 4.0
mysql
null
null
null
null
07/03/2012 14:27:56
off topic
MySQL copy/duplicate database === What is the best way to duplicate a mysql db into another without using mysqldump? With content and without content. I am currently using mysql 4.0
2
25,803
08/25/2008 09:00:23
2,800
08/25/2008 08:25:16
1
0
How do I intercept a method call in C#?
For a given class I would like to have tracing functionality i.e. I would like to log every method call (method signature and actual parameter values) and every method exit (just the method signature). How do I accomplish this assuming that: - I don't want to use any 3rd party AOP libraries for C#, - I don't want to add duplicate code to all the methods that I want to trace, - I don't want to change the public API of the class - users of the class should be able to call all the methods in exactly the same way. To make the question more concrete let's assume there are 3 classes: public class Caller { public static void Call() { Traced traced = new Traced(); traced.Method1(); traced.Method2(); } } public class Traced { public void Method1(String name, Int32 value) { } public void Method2(Object object) { } } public class Logger { public static void LogStart(MethodInfo method, Object[] parameterValues); public static void LogEnd(MethodInfo method); } How do I invoke *Logger.LogStart* and *Logger.LogEnd* for every call to *Method1* and *Method2* without modifying the *Caller.Call* method and without adding the calls explicitly to *Traced.Method1* and *Traced.Method2*?
aop
c#
reflection
null
null
null
open
How do I intercept a method call in C#? === For a given class I would like to have tracing functionality i.e. I would like to log every method call (method signature and actual parameter values) and every method exit (just the method signature). How do I accomplish this assuming that: - I don't want to use any 3rd party AOP libraries for C#, - I don't want to add duplicate code to all the methods that I want to trace, - I don't want to change the public API of the class - users of the class should be able to call all the methods in exactly the same way. To make the question more concrete let's assume there are 3 classes: public class Caller { public static void Call() { Traced traced = new Traced(); traced.Method1(); traced.Method2(); } } public class Traced { public void Method1(String name, Int32 value) { } public void Method2(Object object) { } } public class Logger { public static void LogStart(MethodInfo method, Object[] parameterValues); public static void LogEnd(MethodInfo method); } How do I invoke *Logger.LogStart* and *Logger.LogEnd* for every call to *Method1* and *Method2* without modifying the *Caller.Call* method and without adding the calls explicitly to *Traced.Method1* and *Traced.Method2*?
0
25,807
08/25/2008 09:06:16
2,679
08/24/2008 14:31:44
3
1
Python super class reflection
If I have Python code class A(): pass class B(): pass class C(A, B): pass and I have class `C`, is there a way to iterate through it's super classed (`A` and `B`)? Something like pseudocode: >>> magicGetSuperClasses(C) (<type 'A'>, <type 'B'>)
python
reflection
null
null
null
null
open
Python super class reflection === If I have Python code class A(): pass class B(): pass class C(A, B): pass and I have class `C`, is there a way to iterate through it's super classed (`A` and `B`)? Something like pseudocode: >>> magicGetSuperClasses(C) (<type 'A'>, <type 'B'>)
0
25,823
08/25/2008 09:38:36
2,803
08/25/2008 09:38:36
1
0
Multiple YACC grammars in one program
How do I compile, link and call different YACC grammars using yyparse() in one program?
yacc
null
null
null
null
null
open
Multiple YACC grammars in one program === How do I compile, link and call different YACC grammars using yyparse() in one program?
0
25,833
08/25/2008 10:06:45
123
08/02/2008 08:01:26
719
34
How to open VS 2008 solution in VS 2005?
I have seen [Solutions created in Visual Studio 2008 cannot be opened in Visual Studio 2005](http://blogs.msdn.com/djpark/archive/2007/11/07/how-to-use-solutions-and-projects-between-visual-studio-2005-and-2008.aspx) and tried workaround 1. Yet to try the workaround 2. But as that link was bit old and out of desperation asking here: Is there any convertor available?
vs2008
vs2005
null
null
null
null
open
How to open VS 2008 solution in VS 2005? === I have seen [Solutions created in Visual Studio 2008 cannot be opened in Visual Studio 2005](http://blogs.msdn.com/djpark/archive/2007/11/07/how-to-use-solutions-and-projects-between-visual-studio-2005-and-2008.aspx) and tried workaround 1. Yet to try the workaround 2. But as that link was bit old and out of desperation asking here: Is there any convertor available?
0
25,841
08/25/2008 10:27:55
842
08/09/2008 10:29:44
225
36
Maximum buffer length for sendto?
How do you get the maximum number of bytes that can be passed to a **sendto(..)** call for a socket opened as a UDP port?
unix
sockets
networking
udp
ioctl
null
open
Maximum buffer length for sendto? === How do you get the maximum number of bytes that can be passed to a **sendto(..)** call for a socket opened as a UDP port?
0
25,846
08/25/2008 10:42:24
2,196
08/20/2008 20:54:36
40
6
Installing Apache Web Server on 64 Bit Mac
I know that MAC OS X 10.5 comes with Apache installed but I would like to install the latest Apache without touching the OS Defaults incase it causes problems in the future with other udpates. So I have used the details located at: http://diymacserver.com/installing-apache/compiling-apache-on-leopard/ But I'm unsure how to make this the 64 Bit version of Apache as it seems to still install the 32 bit version. Any help is appreciated Cheers
apache
64
bit
osx
null
null
open
Installing Apache Web Server on 64 Bit Mac === I know that MAC OS X 10.5 comes with Apache installed but I would like to install the latest Apache without touching the OS Defaults incase it causes problems in the future with other udpates. So I have used the details located at: http://diymacserver.com/installing-apache/compiling-apache-on-leopard/ But I'm unsure how to make this the 64 Bit version of Apache as it seems to still install the 32 bit version. Any help is appreciated Cheers
0
25,849
08/25/2008 10:47:31
1,709
08/18/2008 07:05:30
513
47
Alternative to FreeLists for hosting my (developer/software) maling lists?
For many years I have had a low-traffic mailing list at <a href="http://www.freelists.org/">freelists.org</a> to provide users of my hobby software projects with updates about releases and other news. Recently I noticed they now send out monthly reminders to everyone subscribing to any of their hosted lists, informing them which lists the user is subscribed to. I don't want this extra noise on my mailing list, so I am now looking for a new provider. Any suggestions or recommendations?
open-source
mailing-list
provider
null
null
null
open
Alternative to FreeLists for hosting my (developer/software) maling lists? === For many years I have had a low-traffic mailing list at <a href="http://www.freelists.org/">freelists.org</a> to provide users of my hobby software projects with updates about releases and other news. Recently I noticed they now send out monthly reminders to everyone subscribing to any of their hosted lists, informing them which lists the user is subscribed to. I don't want this extra noise on my mailing list, so I am now looking for a new provider. Any suggestions or recommendations?
0
25,865
08/25/2008 11:13:29
416
08/05/2008 14:37:26
1
0
What is a binding?
My good friend, Wikipedia, didn't give me a very good response to that question. So: - What are bindings? - How do they work?
binding
language-agnostic
null
null
null
null
open
What is a binding? === My good friend, Wikipedia, didn't give me a very good response to that question. So: - What are bindings? - How do they work?
0
25,878
08/25/2008 11:29:02
1,521
08/16/2008 10:01:35
248
5
What is a data binding?
What is a data binding?
data
data-binding
presentation
.net
java
null
open
What is a data binding? === What is a data binding?
0
25,902
08/25/2008 11:56:18
1,541
08/16/2008 13:56:32
45
2
What's the best toolchain for Continuous Integration with C++?
Continuous Integration toolchains for .NET and Java Continous Integration are relatively well defined, but the C++ market seems to have less consensus. By CI "toolchain" I specifically mean tools for the build scripts, automated testing, coding standards checking, etc. _all_ with preference given to tools that integrate with CI tools easily (perhaps XML reports, etc). What are C++ programmers using for CI toolchains? (And why do our toolchains suck so bad compared to Java/.NET programmers??!?)
c++
build-process
continuous-integration
null
null
null
open
What's the best toolchain for Continuous Integration with C++? === Continuous Integration toolchains for .NET and Java Continous Integration are relatively well defined, but the C++ market seems to have less consensus. By CI "toolchain" I specifically mean tools for the build scripts, automated testing, coding standards checking, etc. _all_ with preference given to tools that integrate with CI tools easily (perhaps XML reports, etc). What are C++ programmers using for CI toolchains? (And why do our toolchains suck so bad compared to Java/.NET programmers??!?)
0
25,921
08/25/2008 12:14:39
1,179
08/13/2008 11:20:03
57
12
What is asp.net?
Seriously. I've been strictly in a C++ environment for years (and specialized statistical languages). Visual until 2001, and Borland since. Mostly specialized desktop apps for clients. I'm not remaining willfully ignorant of it, but over the years when I've dipped into other things, I've spent my time playing around with javascript, Php, and a lot of Python. Is "asp.net" the language? Is C# the language and "asp.net" the framework? What's a good answer to "What is asp.net"? Is there a correspondence between asp.net and anything I'd be familiar with in C++? I know I can Google the same title, but I'd rather see answers from this crowd. (Besides, in the future, I think that google should point here for questions like that.)
asp.net
null
null
null
null
null
open
What is asp.net? === Seriously. I've been strictly in a C++ environment for years (and specialized statistical languages). Visual until 2001, and Borland since. Mostly specialized desktop apps for clients. I'm not remaining willfully ignorant of it, but over the years when I've dipped into other things, I've spent my time playing around with javascript, Php, and a lot of Python. Is "asp.net" the language? Is C# the language and "asp.net" the framework? What's a good answer to "What is asp.net"? Is there a correspondence between asp.net and anything I'd be familiar with in C++? I know I can Google the same title, but I'd rather see answers from this crowd. (Besides, in the future, I think that google should point here for questions like that.)
0
25,938
08/25/2008 12:23:47
1,154
08/12/2008 23:39:07
278
34
Summary fields in Crystal Report VS2008
I need to have a summary field in each page of the report and en page 2 and forward de same summary has to appear at the top of the page. Anyone know how to do this?
vs2008
crystal-reports
null
null
null
null
open
Summary fields in Crystal Report VS2008 === I need to have a summary field in each page of the report and en page 2 and forward de same summary has to appear at the top of the page. Anyone know how to do this?
0
25,950
08/25/2008 12:34:21
1,693
08/18/2008 02:25:37
588
28
Ruby Performance
I'm pretty keen to develop my first Ruby app, as my company has finally blessed its use internally. In everything I've read about Ruby up to v1.8, there is never anything positive said about performance, but I've found nothing about version 1.9. The last figures I saw about 1.8 had it drastically slower than just about everything out there, so I'm hoping this was addressed in 1.9. Has performance drastically improved? Are there some concrete things that can be done with Ruby apps (or things to avoid) to keep performance at the best possible level?
ruby
performance
null
null
null
null
open
Ruby Performance === I'm pretty keen to develop my first Ruby app, as my company has finally blessed its use internally. In everything I've read about Ruby up to v1.8, there is never anything positive said about performance, but I've found nothing about version 1.9. The last figures I saw about 1.8 had it drastically slower than just about everything out there, so I'm hoping this was addressed in 1.9. Has performance drastically improved? Are there some concrete things that can be done with Ruby apps (or things to avoid) to keep performance at the best possible level?
0
25,952
08/25/2008 12:34:43
797
08/09/2008 02:14:04
244
11
Best programming based games
Back when I was in school, I remember tinkering with a Mac game where you programmed little robots in a sort of pseudo-assembler language which could then battle each other. They could move themselves around the arena, look for opponents in different directions, and fire some sort of weapon. Pretty basic stuff, but I remember it quite fondly, even if I can't remember the name. Are there any good modern day equivalents?
assembly
ai
null
null
null
06/10/2012 15:49:50
not constructive
Best programming based games === Back when I was in school, I remember tinkering with a Mac game where you programmed little robots in a sort of pseudo-assembler language which could then battle each other. They could move themselves around the arena, look for opponents in different directions, and fire some sort of weapon. Pretty basic stuff, but I remember it quite fondly, even if I can't remember the name. Are there any good modern day equivalents?
4
25,968
08/25/2008 12:45:01
290
08/04/2008 12:57:50
394
44
What Are Your Go To Software Metaphors When Working With Non-Technical Management?
What software metaphors have worked best for you in discussing and explaining the complexities of software development with non-technical management?
management
null
null
null
null
03/01/2012 06:11:58
not constructive
What Are Your Go To Software Metaphors When Working With Non-Technical Management? === What software metaphors have worked best for you in discussing and explaining the complexities of software development with non-technical management?
4
25,969
08/25/2008 12:45:56
244
08/04/2008 00:23:06
11
10
SQL Insert into ... values ( SELECT ... FROM ... )
I am trying to insert into a table using the input from another table. Although this is entirely feasible for many database engines, I always seem to struggle to remember the correct syntax for the SQL-Engine of the day (MySQL, Oracle, SQLServer, Informix, DB2). I've been wondering if there is a silver-bullet syntax coming from an SQL Standards (For example, SQL92) that would allow me to insert the values without worrying about the underlying database.
sql
database
informix
null
null
null
open
SQL Insert into ... values ( SELECT ... FROM ... ) === I am trying to insert into a table using the input from another table. Although this is entirely feasible for many database engines, I always seem to struggle to remember the correct syntax for the SQL-Engine of the day (MySQL, Oracle, SQLServer, Informix, DB2). I've been wondering if there is a silver-bullet syntax coming from an SQL Standards (For example, SQL92) that would allow me to insert the values without worrying about the underlying database.
0
25,975
08/25/2008 12:51:33
1,382
08/14/2008 23:14:48
46
2
How can I get the name of the executing .exe?
The Compact Framework doesn't support Assembly.GetEntryAssembly to determine the launching .exe. So is there another way to get the name of the executing .exe?
.net
null
null
null
null
null
open
How can I get the name of the executing .exe? === The Compact Framework doesn't support Assembly.GetEntryAssembly to determine the launching .exe. So is there another way to get the name of the executing .exe?
0
25,977
08/25/2008 12:51:49
2,680
08/24/2008 14:33:15
21
2
How can I measure the similarity between two images?
I would like to compare a screenshot of one application (could be a Web page) with a previously taken screenshot to determine whether the application is displaying itself correctly. I don't want an exact match comparison, because the aspect could be slightly different (in the case of a Web app, depending on the browser, some element could be at a slightly different location). It should give a measure of how similar are the screenshots. Is there a library / tool that already does that? How would you implement it?
language-agnostic
algorithm
image
null
null
null
open
How can I measure the similarity between two images? === I would like to compare a screenshot of one application (could be a Web page) with a previously taken screenshot to determine whether the application is displaying itself correctly. I don't want an exact match comparison, because the aspect could be slightly different (in the case of a Web app, depending on the browser, some element could be at a slightly different location). It should give a measure of how similar are the screenshots. Is there a library / tool that already does that? How would you implement it?
0
25,982
08/25/2008 12:54:52
2,373
08/21/2008 21:57:58
1
1
What's the simplest way to connect to a .NET remote server object
Given that my client code knows everything it needs to about the remoting object, what's the simplest way to connect to it? This is what I'm doing at the moment: ChannelServices.RegisterChannel(new HttpChannel(), false); RemotingConfiguration.RegisterWellKnownServiceType( typeof(IRemoteServer), "RemoteServer.rem", WellKnownObjectMode.Singleton); MyServerObject = (IRemoteServer)Activator.GetObject( typeof(IRemoteServer), String.Format("tcp://{0}:{1}/RemoteServer.rem", server, port));
c#
.net
remoting
null
null
null
open
What's the simplest way to connect to a .NET remote server object === Given that my client code knows everything it needs to about the remoting object, what's the simplest way to connect to it? This is what I'm doing at the moment: ChannelServices.RegisterChannel(new HttpChannel(), false); RemotingConfiguration.RegisterWellKnownServiceType( typeof(IRemoteServer), "RemoteServer.rem", WellKnownObjectMode.Singleton); MyServerObject = (IRemoteServer)Activator.GetObject( typeof(IRemoteServer), String.Format("tcp://{0}:{1}/RemoteServer.rem", server, port));
0
25,999
08/25/2008 13:10:37
996
08/11/2008 12:29:14
1
1
Secure Online Highscore Lists for Non-Web Games
I'm playing around with a native (non-web) single-player game I'm writing, and it occured to me that having a daily/weekly/all-time **online highscore list** (think Xbox Live Leaderboard) would make the game much more interesting, adding some (small) amount of community and competition. However, I'm afraid people would see such a feature as an invitation to hacking, which would discourage regular players due to impossibly high scores. I thought about the obvious ways of preventing such attempts (public/private key encryption, for example), but I've figured out reasonably simple ways hackers could circumvent all of my ideas (extracting the private key from the binary and thus sending fake encrypted scores, for example). Have you ever implemented an online highscore list or leaderboard? Did you find a reasonably hacker-proof way of implementing this? If so, how did you do it? What are your experiences with hacking attempts?
leaderboard
encryption
null
null
null
null
open
Secure Online Highscore Lists for Non-Web Games === I'm playing around with a native (non-web) single-player game I'm writing, and it occured to me that having a daily/weekly/all-time **online highscore list** (think Xbox Live Leaderboard) would make the game much more interesting, adding some (small) amount of community and competition. However, I'm afraid people would see such a feature as an invitation to hacking, which would discourage regular players due to impossibly high scores. I thought about the obvious ways of preventing such attempts (public/private key encryption, for example), but I've figured out reasonably simple ways hackers could circumvent all of my ideas (extracting the private key from the binary and thus sending fake encrypted scores, for example). Have you ever implemented an online highscore list or leaderboard? Did you find a reasonably hacker-proof way of implementing this? If so, how did you do it? What are your experiences with hacking attempts?
0
26,002
08/25/2008 13:14:00
2,676
08/24/2008 13:10:20
1
0
Develop on local Oracle instance
I want our team to develop against local instances of an Oracle database. With MS SQL, I can use SQL Express Edition. What are my options?
oracle
null
null
null
null
null
open
Develop on local Oracle instance === I want our team to develop against local instances of an Oracle database. With MS SQL, I can use SQL Express Edition. What are my options?
0
26,007
08/25/2008 13:17:17
572
08/06/2008 20:56:54
1,611
129
Iterating over a complex Associative Array in PHP
Is there an easy way to iterate over an associative array of this structure in PHP: The array `$searches` has a numbered index, with between 4 and 5 associative parts. So I not only need to iterate over $searches[0] through $searches[n], but also $searches[0]["part0"] through $searches[n]["partn"]. The hard part is that different indexes have different numbers of parts (some might be missing one or two). Thoughts on doing this in a way that's nice, neat, and understandable?
php
arrays
associative-array
null
null
null
open
Iterating over a complex Associative Array in PHP === Is there an easy way to iterate over an associative array of this structure in PHP: The array `$searches` has a numbered index, with between 4 and 5 associative parts. So I not only need to iterate over $searches[0] through $searches[n], but also $searches[0]["part0"] through $searches[n]["partn"]. The hard part is that different indexes have different numbers of parts (some might be missing one or two). Thoughts on doing this in a way that's nice, neat, and understandable?
0
26,020
08/25/2008 13:25:44
2,674
08/24/2008 12:31:39
1
1
What is the best way to connect and use a sqlite database fron C#
I've done this before in C++ by including sqlite.h but is there a similarly easy way in C#?
c#
sqlite
null
null
null
null
open
What is the best way to connect and use a sqlite database fron C# === I've done this before in C++ by including sqlite.h but is there a similarly easy way in C#?
0
26,021
08/25/2008 13:26:15
2,077
08/20/2008 07:26:21
92
3
How is data compression more effective than indexing for search performance?
For our application, we keep large amounts of data indexed by three integer columns (source, type and time). Loading significant chunks of that data can take some time and we have implemented various measures to reduce the amount of data that has to be searched and loaded for larger queries, such as storing larger granularities for queries that don't require a high resolution (time-wise). When searching for data in our backup archives, where the data is stored in bzipped text files, but has basically the same structure, I noticed that it is significantly faster to untar to stdout and pipe it through grep than to untar it to disk and grep the files. In fact, the untar-to-pipe was even noticeably faster than just grepping the files (i. e. discounting the untar-to-disk). This made me wonder if the performance impact of disk I/O might be much heavier than I thought. So here's my question: <b>Do you think putting the data of multiple rows into a (compressed) blob field of a single row and search for single rows on the fly could be faster than searching for the same rows via the table index?</b> For example, instead of having this table CREATE TABLE data ( `source` INT, `type` INT, `timestamp` INT, `value` DOUBLE); I would have CREATE TABLE quickdata ( `source` INT, `type` INT, `day` INT, `dayvalues` BLOB ); with approximately 100-300 rows in data for each row in quickdata and searching for the desired timestamps on the fly during decompression and decoding of the blob field. Does this make sense to you? What parameters should I investigate? What strings might be attached? What DB features (any DBMS) exist to achieve similar effects?
db
performance
null
null
null
null
open
How is data compression more effective than indexing for search performance? === For our application, we keep large amounts of data indexed by three integer columns (source, type and time). Loading significant chunks of that data can take some time and we have implemented various measures to reduce the amount of data that has to be searched and loaded for larger queries, such as storing larger granularities for queries that don't require a high resolution (time-wise). When searching for data in our backup archives, where the data is stored in bzipped text files, but has basically the same structure, I noticed that it is significantly faster to untar to stdout and pipe it through grep than to untar it to disk and grep the files. In fact, the untar-to-pipe was even noticeably faster than just grepping the files (i. e. discounting the untar-to-disk). This made me wonder if the performance impact of disk I/O might be much heavier than I thought. So here's my question: <b>Do you think putting the data of multiple rows into a (compressed) blob field of a single row and search for single rows on the fly could be faster than searching for the same rows via the table index?</b> For example, instead of having this table CREATE TABLE data ( `source` INT, `type` INT, `timestamp` INT, `value` DOUBLE); I would have CREATE TABLE quickdata ( `source` INT, `type` INT, `day` INT, `dayvalues` BLOB ); with approximately 100-300 rows in data for each row in quickdata and searching for the desired timestamps on the fly during decompression and decoding of the blob field. Does this make sense to you? What parameters should I investigate? What strings might be attached? What DB features (any DBMS) exist to achieve similar effects?
0
26,025
08/25/2008 13:28:41
2,639
08/23/2008 20:32:12
66
6
Cleanest & Fastest server setup for Django
I'm about to deploy a mediumsized site powered by Django. I have a dedicated Ubuntu Server. I'm really confused over which serversoftware to use. So i thought to myself: why not ask stackoverflow. What i'm looking for is: - Easy to set up - Fast and easy on resources - Can serve mediafiles - Able to serve multiple djangosites on same server - I would rather not install PHP or anything else that sucks resources, and for which I have no use for. I have heard of mod_wsgi and mod_python on Apache, nginx and lighty. Which are the pros and cons of these and have i missed someone?
django
hosting
python
null
null
null
open
Cleanest & Fastest server setup for Django === I'm about to deploy a mediumsized site powered by Django. I have a dedicated Ubuntu Server. I'm really confused over which serversoftware to use. So i thought to myself: why not ask stackoverflow. What i'm looking for is: - Easy to set up - Fast and easy on resources - Can serve mediafiles - Able to serve multiple djangosites on same server - I would rather not install PHP or anything else that sucks resources, and for which I have no use for. I have heard of mod_wsgi and mod_python on Apache, nginx and lighty. Which are the pros and cons of these and have i missed someone?
0
26,028
08/25/2008 13:29:54
2,764
08/24/2008 23:08:41
1
1
Upgrading Sharepoint 3.0 to SQL 2005 Backend?
We're trying to get rid of all of our SQL Server 2000 databases to re purpose our old DB server... Sharepoint 3.0 is being a showstopper. I've looked at a lot of guides from Microsoft and tried the instructions in those. I've also just tried the good ol' exec sp_detach_db / sp_attach_db with no luck. Has anyone actually done this?
sharepoint
microsoft
sql-server-2005
sql-server-2000
null
null
open
Upgrading Sharepoint 3.0 to SQL 2005 Backend? === We're trying to get rid of all of our SQL Server 2000 databases to re purpose our old DB server... Sharepoint 3.0 is being a showstopper. I've looked at a lot of guides from Microsoft and tried the instructions in those. I've also just tried the good ol' exec sp_detach_db / sp_attach_db with no luck. Has anyone actually done this?
0
26,041
08/25/2008 13:38:48
2,841
08/25/2008 13:38:48
1
0
Browser-based game - Which framework to choose?
I'm starting to develop a browser-based game (and by this I mean text-based, no Flash or similar stuff on it) and I'm struggling to decide on which development framework to use. As far as requirements are concerned, the most important thing that I can think of right now is the ability to translate it to several languages. A good object-relational mapping and a way to generate forms from logical objects would also be very good, as I've noticed that I always spend lots of time solving the problems that come up when I change any of those things. The programming language is kind of unimportant. I have some experience in PHP and C#, but I don't mind, and I would even like to use this as an excuse, learning some new thing like Python or Ruby. What I do want is something with a good and thriving community and lots of samples and tutorials online to help me. Thanks in advance.
language-agnostic
framework
null
null
null
null
open
Browser-based game - Which framework to choose? === I'm starting to develop a browser-based game (and by this I mean text-based, no Flash or similar stuff on it) and I'm struggling to decide on which development framework to use. As far as requirements are concerned, the most important thing that I can think of right now is the ability to translate it to several languages. A good object-relational mapping and a way to generate forms from logical objects would also be very good, as I've noticed that I always spend lots of time solving the problems that come up when I change any of those things. The programming language is kind of unimportant. I have some experience in PHP and C#, but I don't mind, and I would even like to use this as an excuse, learning some new thing like Python or Ruby. What I do want is something with a good and thriving community and lots of samples and tutorials online to help me. Thanks in advance.
0
26,062
08/25/2008 13:54:05
730
08/08/2008 12:40:04
90
16
Can DTS Test for Presence of MS-Access Table
I have an Access database in which I drop the table and then create the table afresh. However, I need to be able to test for the table in case the table gets dropped but not created (i.e. when someone stops the DTS package just after it starts -roll-eyes- ). If I were doing this in the SQL database I would just do: IF (EXISTS (SELECT * FROM sysobjects WHERE name = 'Table-Name-to-look-for')) BEGIN drop table Table-Name-to-look-for END But how do I do that for an Access database? SQL Server 2000
ms-access
sql-server
dts
null
null
null
open
Can DTS Test for Presence of MS-Access Table === I have an Access database in which I drop the table and then create the table afresh. However, I need to be able to test for the table in case the table gets dropped but not created (i.e. when someone stops the DTS package just after it starts -roll-eyes- ). If I were doing this in the SQL database I would just do: IF (EXISTS (SELECT * FROM sysobjects WHERE name = 'Table-Name-to-look-for')) BEGIN drop table Table-Name-to-look-for END But how do I do that for an Access database? SQL Server 2000
0
26,065
08/25/2008 13:57:42
2,564
08/22/2008 22:24:11
11
4
Mobel Based Testing Strategies
What strategies have you used with Model Based Testing? - Do you use it exclusively for integration testing, or branch it out to other areas (unit/functional/system/spec verification)? - Do you build focused "sealed" models or do you evolve complex onibus models over time? - When in the product cycle do you invest in creating MBTs? - What sort of base test libraries do you create for exclusively MBTs? - What difference do you make in your functional base test libraries to better support MBTs?
integration-testing
testing
mbt
null
null
null
open
Mobel Based Testing Strategies === What strategies have you used with Model Based Testing? - Do you use it exclusively for integration testing, or branch it out to other areas (unit/functional/system/spec verification)? - Do you build focused "sealed" models or do you evolve complex onibus models over time? - When in the product cycle do you invest in creating MBTs? - What sort of base test libraries do you create for exclusively MBTs? - What difference do you make in your functional base test libraries to better support MBTs?
0
26,072
08/25/2008 14:04:49
2,564
08/22/2008 22:24:11
11
4
Reconnect logic with connectivity notifications
Say I have an application that wants a persistant connection to a server. How do I implement connection/reconnection logic so that I'm not wasting resources (power/bandwidth) and I have fast reconnect time when connectivity appears/improves? If I only use connectivity notifications, I can get stuck on problems not related to the local network. Bonus if you could show me the C# version.
sockets
networking
offline
null
null
null
open
Reconnect logic with connectivity notifications === Say I have an application that wants a persistant connection to a server. How do I implement connection/reconnection logic so that I'm not wasting resources (power/bandwidth) and I have fast reconnect time when connectivity appears/improves? If I only use connectivity notifications, I can get stuck on problems not related to the local network. Bonus if you could show me the C# version.
0
26,074
08/25/2008 14:06:38
2,483
08/22/2008 13:32:32
1
0
How can I figure out how much memory a .Net Appdomain is consuming?
I'm trying to programmatically restrict the memory consumption of plugins running in a .Net AppDomain, but I can't find any setup parameters for this, nor can I find a way to query an AppDomain to figure out how much memory it is consuming. Any ideas?
.net
clr
null
null
null
null
open
How can I figure out how much memory a .Net Appdomain is consuming? === I'm trying to programmatically restrict the memory consumption of plugins running in a .Net AppDomain, but I can't find any setup parameters for this, nor can I find a way to query an AppDomain to figure out how much memory it is consuming. Any ideas?
0
26,075
08/25/2008 14:07:31
2,437
08/22/2008 10:42:39
8
1
Resize Infragistics GanttChart task with the mouse
I loaded a custom DataTable into an UltraChart of type GanttChart. The data loads succesfully. Do you know if it possible to add support for mouse resize(drag) to the tasks that show up into the chart? I have not been able to figure out if this is supported by the Infragistics control. Thank you in advance for your answers. <br />Dragos
winforms
infragistics
null
null
null
null
open
Resize Infragistics GanttChart task with the mouse === I loaded a custom DataTable into an UltraChart of type GanttChart. The data loads succesfully. Do you know if it possible to add support for mouse resize(drag) to the tasks that show up into the chart? I have not been able to figure out if this is supported by the Infragistics control. Thank you in advance for your answers. <br />Dragos
0
26,076
08/25/2008 14:07:35
260
08/04/2008 08:21:41
56
4
MS SQL Device or User CAL
Can you please explain the difference between MS SQL Device and User CAls. I need the MS SQL Server for an intranet website, how do I assess whow many license I need and what type?
sql-server
licensing
null
null
null
null
open
MS SQL Device or User CAL === Can you please explain the difference between MS SQL Device and User CAls. I need the MS SQL Server for an intranet website, how do I assess whow many license I need and what type?
0
26,079
08/25/2008 14:11:10
305
08/04/2008 14:04:19
638
43
In a PHP5 class, when does a private constructor get called?
Let's say I'm writing a PHP (>= 5.0) class that's meant to be a singleton. All of the docs I've read say to make the class constructor private so the class can't be directly instantiated. So if I have something like this: class SillyDB { private function __construct() { } private function getConnection() { } } Are there any cases where __construct() is called other than if I'm doing a new SillyDB() call inside the class itself? And why am I allowed to instantiate SillyDB from inside itself at all?
php
oop
constructor
null
null
null
open
In a PHP5 class, when does a private constructor get called? === Let's say I'm writing a PHP (>= 5.0) class that's meant to be a singleton. All of the docs I've read say to make the class constructor private so the class can't be directly instantiated. So if I have something like this: class SillyDB { private function __construct() { } private function getConnection() { } } Are there any cases where __construct() is called other than if I'm doing a new SillyDB() call inside the class itself? And why am I allowed to instantiate SillyDB from inside itself at all?
0
26,085
08/25/2008 14:16:45
572
08/06/2008 20:56:54
1,623
131
What is a good Content Management System to deploy for a personal website/blog?
I originally thought [building my own][1] was the way to go, but I've recently changed my mind for two reasons - first, I don't want to reinvent the wheel and second, I don't have enough web development experience at this time to do a good job with it. I've read another similar question, but I want more than a [barebones CMS][2]. Really, the only features I need out of the box are blogging tools, a site map, the ability to create non-blog pages (for things like "about me" and such). But I also want to be able to turn on or add additional functionality as I need it, especially since I eventually want to put my own projects on the website for download. I've used [CMSMatrix][3] to attempt to find a good one, but it's tough. There are so many options, but I haven't really seen one I want. Does anyone have any recommendations for a free CMS that's good for not only dynamic content, but also static content? In addition, I'm looking for one written in PHP/JavaScript because I want to be able to read and understand the code to learn more about CMS implementations and the database must be MySQL (that's what my host supports). Does anyone have any experience with a CMS and willing to share their thoughts? For the record, I'm currently looking at [TYPO3][4]. [1]: http://stackoverflow.com/questions/9877/personal-website-construction [2]: http://stackoverflow.com/questions/4164/what-is-a-good-barebones-cms-or-framework [3]: http://www.cmsmatrix.org/ [4]: http://typo3.org/
website
content-management-system
blogs
personal-website
null
null
open
What is a good Content Management System to deploy for a personal website/blog? === I originally thought [building my own][1] was the way to go, but I've recently changed my mind for two reasons - first, I don't want to reinvent the wheel and second, I don't have enough web development experience at this time to do a good job with it. I've read another similar question, but I want more than a [barebones CMS][2]. Really, the only features I need out of the box are blogging tools, a site map, the ability to create non-blog pages (for things like "about me" and such). But I also want to be able to turn on or add additional functionality as I need it, especially since I eventually want to put my own projects on the website for download. I've used [CMSMatrix][3] to attempt to find a good one, but it's tough. There are so many options, but I haven't really seen one I want. Does anyone have any recommendations for a free CMS that's good for not only dynamic content, but also static content? In addition, I'm looking for one written in PHP/JavaScript because I want to be able to read and understand the code to learn more about CMS implementations and the database must be MySQL (that's what my host supports). Does anyone have any experience with a CMS and willing to share their thoughts? For the record, I'm currently looking at [TYPO3][4]. [1]: http://stackoverflow.com/questions/9877/personal-website-construction [2]: http://stackoverflow.com/questions/4164/what-is-a-good-barebones-cms-or-framework [3]: http://www.cmsmatrix.org/ [4]: http://typo3.org/
0
26,086
08/25/2008 14:17:10
2,541
08/22/2008 18:21:46
31
5
How do you make wrong code look wrong? What patterns do you use to avoid semantic errors?
Ever since I first made the mistake of doing an assignment in an `if` I've always written my ifs like this: if (0 == variable) { to avoid the common (at least for me) mistake of doing this: if (variable = 0) { //WRONG, assigning 0 to variable And since I read Joel Spolsky's essay [Making Wrong Code Look Wrong](http://www.joelonsoftware.com/articles/Wrong.html) I've been trying to put his advice into practice. So what other patterns do you use to make wrong code look wrong, or to force syntactic errors if you make a semantic mistake?
syntax
code-review
semantic
null
null
null
open
How do you make wrong code look wrong? What patterns do you use to avoid semantic errors? === Ever since I first made the mistake of doing an assignment in an `if` I've always written my ifs like this: if (0 == variable) { to avoid the common (at least for me) mistake of doing this: if (variable = 0) { //WRONG, assigning 0 to variable And since I read Joel Spolsky's essay [Making Wrong Code Look Wrong](http://www.joelonsoftware.com/articles/Wrong.html) I've been trying to put his advice into practice. So what other patterns do you use to make wrong code look wrong, or to force syntactic errors if you make a semantic mistake?
0
26,094
08/25/2008 14:20:34
224
08/03/2008 17:17:37
401
24
Most efficient implementation of a large number class
When doing calculations on very large numbers where integral data types such as double or int64 falls short, a separate class to handle such large numbers may be needed. Does anyone care to offer an efficient algorithm on how best to do this?
language-agnostic
math
number
largenumber
null
null
open
Most efficient implementation of a large number class === When doing calculations on very large numbers where integral data types such as double or int64 falls short, a separate class to handle such large numbers may be needed. Does anyone care to offer an efficient algorithm on how best to do this?
0
26,098
08/25/2008 14:22:21
194
08/03/2008 10:56:49
1,826
106
Overloaded functions in C++ DLL def file
I'm writing a C/C++ DLL and want to export certain functions which I've done before using a .def file like this LIBRARY "MyLib" EXPORTS Foo Bar with the code defined as this, for example: int Foo(int a); void Bar(int foo); However, what if I want to declare an overloaded method of Foo() like: int Foo(int a, int b); As the def file only has the function name and not the full prototype I can't see how it would handle the overloaded functions. Do you just use the one entry and then specify which overloaded version you want when passing in the properly prototyped function pointer to LoadLibrary() ?
c
c++
dll
null
null
null
open
Overloaded functions in C++ DLL def file === I'm writing a C/C++ DLL and want to export certain functions which I've done before using a .def file like this LIBRARY "MyLib" EXPORTS Foo Bar with the code defined as this, for example: int Foo(int a); void Bar(int foo); However, what if I want to declare an overloaded method of Foo() like: int Foo(int a, int b); As the def file only has the function name and not the full prototype I can't see how it would handle the overloaded functions. Do you just use the one entry and then specify which overloaded version you want when passing in the properly prototyped function pointer to LoadLibrary() ?
0
26,111
08/25/2008 14:28:03
2,850
08/25/2008 14:28:03
1
0
Failed to load resources from resource file.
Get the following error periodically in an IIS application: >Failed to load resources from resource file. The full error message in the Application Event Log is: >Event Type: Error<br> >Event Source: .NET Runtime<br> >Event Category: None<br> >Event ID: 0<br> >Date: 8/8/2008<br> >Time: 8:8:8 AM<br> >User: N/A<br> >Computer: BLAH123<br> >Description:<br> >The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be found. The >local computer may not have the necessary registry information or message DLL files to >display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: .NET Runtime version 1.1.4322.2407- Setup Error: Failed to load resources from resource file<br> >Please check your Setup.<br> Application is written in .NET 1.1 but the server runs ASP.NET 2.0. Thanx.
.net
iis
null
null
null
null
open
Failed to load resources from resource file. === Get the following error periodically in an IIS application: >Failed to load resources from resource file. The full error message in the Application Event Log is: >Event Type: Error<br> >Event Source: .NET Runtime<br> >Event Category: None<br> >Event ID: 0<br> >Date: 8/8/2008<br> >Time: 8:8:8 AM<br> >User: N/A<br> >Computer: BLAH123<br> >Description:<br> >The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be found. The >local computer may not have the necessary registry information or message DLL files to >display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: .NET Runtime version 1.1.4322.2407- Setup Error: Failed to load resources from resource file<br> >Please check your Setup.<br> Application is written in .NET 1.1 but the server runs ASP.NET 2.0. Thanx.
0
26,113
08/25/2008 14:28:47
2,702
08/24/2008 15:52:48
16
1
What is your best tool or techniques for getting the same display on IE6/7 and Firefox?
I'm not talking about tools that let one view a page in combinations of operating systems and browsers like crossbrowsertesting.com but in creating or figuring out the actual CSS.
css
firefox
internet-explorer
null
null
null
open
What is your best tool or techniques for getting the same display on IE6/7 and Firefox? === I'm not talking about tools that let one view a page in combinations of operating systems and browsers like crossbrowsertesting.com but in creating or figuring out the actual CSS.
0
26,123
08/25/2008 14:33:18
1,535
08/16/2008 12:32:17
1
0
Accessing .NET components from Powershell
I want to use Powershell to write some utilities, leveraging our own .NET components to handle the actual work. This is in place of writing a small console app to tie the calls together. My question is where I would find a good source of documentation or tutorial material to help me fast track this?
powershell
components
null
null
null
null
open
Accessing .NET components from Powershell === I want to use Powershell to write some utilities, leveraging our own .NET components to handle the actual work. This is in place of writing a small console app to tie the calls together. My question is where I would find a good source of documentation or tutorial material to help me fast track this?
0
26,137
08/25/2008 14:38:38
2,147
08/20/2008 15:14:13
107
17
VBScript/ASP Classic
I have a couple of questions regarding VBScript and ASP Classic: 1) What is the preferred way to access an MS SQL Server database in VBScript/ASP? 2) What are best practices in regards to separating model from view from controller? 3) Any other things I should know about either VBScript or ASP? If you haven't noticed, I'm new at VBScript coding. I realize numbers 2 & 3 are kind of giant "black hole" questions that are overly general, so don't think that I'm expecting to learn everything there is to know about those two questions from here.
asp
vbscript
mvc
ms-sql
null
null
open
VBScript/ASP Classic === I have a couple of questions regarding VBScript and ASP Classic: 1) What is the preferred way to access an MS SQL Server database in VBScript/ASP? 2) What are best practices in regards to separating model from view from controller? 3) Any other things I should know about either VBScript or ASP? If you haven't noticed, I'm new at VBScript coding. I realize numbers 2 & 3 are kind of giant "black hole" questions that are overly general, so don't think that I'm expecting to learn everything there is to know about those two questions from here.
0
26,145
08/25/2008 14:45:15
2,710
08/24/2008 16:49:40
1
0
Cannot add a launch shortcut (Eclipse Plug-in)
I'm making a simple extra java app launcher for Eclipse 3.2 (JBuilder 2007-8) for internal use. So I looked up all the documentations related, including this one [The Launching Framework from eclipse.org][1] and have managed to make everything else working with the exception of the launch shortcut. ![alt text][2] This is the part of my plugin.xml. <extension point="org.eclipse.debug.ui.launchShortcuts"> <shortcut category="mycompany.javalaunchext.launchConfig" class="mycompany.javalaunchext.LaunchShortcut" description="launchshortcutsdescription" icon="icons/k2mountain.png" id="mycompany.javalaunchext.launchShortcut" label="Java Application Ext." modes="run, debug"> <perspective id="org.eclipse.jdt.ui.JavaPerspective"> </perspective> <perspective id="org.eclipse.jdt.ui.JavaHierarchyPerspective"> </perspective> <perspective id="org.eclipse.jdt.ui.JavaBrowsingPerspective"> </perspective> <perspective id="org.eclipse.debug.ui.DebugPerspective"> </perspective> </shortcut> </extension> The configuration name in the category section is correct and the class in the class section, i believe, is correctly implemented. (basically copied from org.eclipse.jdt.debug.ui.launchConfigurations.JavaApplicationLaunchShortcut) Thanks in advance. Woongbin [1]: http://www.eclipse.org/articles/Article-Launch-Framework/launch.html "The Launching Framework" [2]: http://byfiles.storage.live.com/y1pFIuXB7pG9hdieaLsbwbNz7F2zqxSv9id-s0VCjdbBbx3vlbuBEtpEvFqnQIno_EIkOMPKTyxd4Q
eclipse
plugins
null
null
null
null
open
Cannot add a launch shortcut (Eclipse Plug-in) === I'm making a simple extra java app launcher for Eclipse 3.2 (JBuilder 2007-8) for internal use. So I looked up all the documentations related, including this one [The Launching Framework from eclipse.org][1] and have managed to make everything else working with the exception of the launch shortcut. ![alt text][2] This is the part of my plugin.xml. <extension point="org.eclipse.debug.ui.launchShortcuts"> <shortcut category="mycompany.javalaunchext.launchConfig" class="mycompany.javalaunchext.LaunchShortcut" description="launchshortcutsdescription" icon="icons/k2mountain.png" id="mycompany.javalaunchext.launchShortcut" label="Java Application Ext." modes="run, debug"> <perspective id="org.eclipse.jdt.ui.JavaPerspective"> </perspective> <perspective id="org.eclipse.jdt.ui.JavaHierarchyPerspective"> </perspective> <perspective id="org.eclipse.jdt.ui.JavaBrowsingPerspective"> </perspective> <perspective id="org.eclipse.debug.ui.DebugPerspective"> </perspective> </shortcut> </extension> The configuration name in the category section is correct and the class in the class section, i believe, is correctly implemented. (basically copied from org.eclipse.jdt.debug.ui.launchConfigurations.JavaApplicationLaunchShortcut) Thanks in advance. Woongbin [1]: http://www.eclipse.org/articles/Article-Launch-Framework/launch.html "The Launching Framework" [2]: http://byfiles.storage.live.com/y1pFIuXB7pG9hdieaLsbwbNz7F2zqxSv9id-s0VCjdbBbx3vlbuBEtpEvFqnQIno_EIkOMPKTyxd4Q
0
26,147
08/25/2008 14:45:27
2,684
08/24/2008 14:38:27
123
12
Is it possible to Embed Gecko or Webkit in a C#.NET Win Form just like a WebView?
I'd love to know if there is such thing as a Gecko.NET ;) I mean, just like we can embed a WebView and that is an "instance" of IE7 inside any Windows Forms application (and tell it to "navigateto (fancy_url);", I'd love to use FireFox or WebKit. Anybody tried this?
c#
.net
winforms
webkit
gecko
null
open
Is it possible to Embed Gecko or Webkit in a C#.NET Win Form just like a WebView? === I'd love to know if there is such thing as a Gecko.NET ;) I mean, just like we can embed a WebView and that is an "instance" of IE7 inside any Windows Forms application (and tell it to "navigateto (fancy_url);", I'd love to use FireFox or WebKit. Anybody tried this?
0
26,148
08/25/2008 14:45:54
941
08/10/2008 21:04:56
1,383
123
Windows Service Increasing CPU Consumption
At my job, I have a clutch of six Windows services that I am responsible for, written in C# 2003. Each of these services contain a timer that fires every minute or so, where the majority of their work happens. My problem is that, as these services run, they start to consume more and more CPU time through each iteration of the loop, even if there is no meaningful work for them to do (ie, they're just idling, looking through the database for something to do). When they start up, each service uses an average of (about) 2-3% of 4 CPUs, which is fine. After 24 hours, each service will be consuming an entire processor for the duration of its loop's run. Can anyone help? I'm at a loss as to what could be causing this. Our current solution is to restart the services once a day (they shut themselves down, then a script sees that they're offline and restarts them at about 3AM). But this is not a long term solution; my concern is that as the services get busier, restarting them once a day may not be sufficient... but as there's a significant startup penalty (they all use NHibernate for data access), as they get busier, exactly what we *don't* want to be doing is restarting them more frequently.
c#
nhibernate
windows-services
.net-1.1
null
null
open
Windows Service Increasing CPU Consumption === At my job, I have a clutch of six Windows services that I am responsible for, written in C# 2003. Each of these services contain a timer that fires every minute or so, where the majority of their work happens. My problem is that, as these services run, they start to consume more and more CPU time through each iteration of the loop, even if there is no meaningful work for them to do (ie, they're just idling, looking through the database for something to do). When they start up, each service uses an average of (about) 2-3% of 4 CPUs, which is fine. After 24 hours, each service will be consuming an entire processor for the duration of its loop's run. Can anyone help? I'm at a loss as to what could be causing this. Our current solution is to restart the services once a day (they shut themselves down, then a script sees that they're offline and restarts them at about 3AM). But this is not a long term solution; my concern is that as the services get busier, restarting them once a day may not be sufficient... but as there's a significant startup penalty (they all use NHibernate for data access), as they get busier, exactly what we *don't* want to be doing is restarting them more frequently.
0
26,151
08/25/2008 14:47:00
2,759
08/24/2008 22:18:07
1
0
Template typedefs - What's your work around ?
C++ 0x has template typedefs. See [here][1]. Current spec of C++ does not. What do you like to use as work around ? Container objects or Macros ? Do you feel its worth it ? [1]: http://en.wikipedia.org/wiki/C%2B%2B0x#Template_typedefs
c++
type-safety
null
null
null
null
open
Template typedefs - What's your work around ? === C++ 0x has template typedefs. See [here][1]. Current spec of C++ does not. What do you like to use as work around ? Container objects or Macros ? Do you feel its worth it ? [1]: http://en.wikipedia.org/wiki/C%2B%2B0x#Template_typedefs
0
26,158
08/25/2008 14:49:29
1,935
08/19/2008 14:31:00
11
9
How Does A Stack Overflow Occur and How Do You Prevent It?
I was just wondering how a stack overflow occurs and the best ways to make sure it doesn't happen, or ways to prevent one - particularly on web servers, but other examples would be interesting, as well.
hacking
stackoverflow
null
null
null
null
open
How Does A Stack Overflow Occur and How Do You Prevent It? === I was just wondering how a stack overflow occurs and the best ways to make sure it doesn't happen, or ways to prevent one - particularly on web servers, but other examples would be interesting, as well.
0
26,173
08/25/2008 14:57:02
370,899
08/22/2008 12:32:04
11
2
Is there a Scheduler/Calender JS Widget library?
<b>Info</b> I am looking for some JavaScript based component to be used as a course scheduler which would be a cross between Google Calender and the login time . I do not know if the right term for this is <i>Course Scheduler</i> but I shall desribe this in more detail here. <b>Course Scheduler</b> The widget would be used to enter date and times of a course, as an example if I run a programming course 3 days a week on Mon, Tue and Wed every 7:00 am to 9:00am, 2 hours every day from 1st September to 30th November. I could answer various questions and the course data would be displayed in the calender. It would also allow for non pattern based timings where each week is different from the other week etc. <b>Question</b> So would I end up creating something from scratch? Would it be sensible to use Google Calender API for this? I did a Google search for some widgets, but I believe I need better keywords, as I could not find anything close to what I am looking for. Any tips? Commercial libraries would also work for me. Thanks.
javascript
calender
web-ui
null
null
null
open
Is there a Scheduler/Calender JS Widget library? === <b>Info</b> I am looking for some JavaScript based component to be used as a course scheduler which would be a cross between Google Calender and the login time . I do not know if the right term for this is <i>Course Scheduler</i> but I shall desribe this in more detail here. <b>Course Scheduler</b> The widget would be used to enter date and times of a course, as an example if I run a programming course 3 days a week on Mon, Tue and Wed every 7:00 am to 9:00am, 2 hours every day from 1st September to 30th November. I could answer various questions and the course data would be displayed in the calender. It would also allow for non pattern based timings where each week is different from the other week etc. <b>Question</b> So would I end up creating something from scratch? Would it be sensible to use Google Calender API for this? I did a Google search for some widgets, but I believe I need better keywords, as I could not find anything close to what I am looking for. Any tips? Commercial libraries would also work for me. Thanks.
0
26,176
08/25/2008 14:59:49
2,836
08/25/2008 13:07:57
1
3
Why is Harvest being purchased at all?
Does your work environment use Harvest SCM? I've used this now at two different locations and find it appalling. In one situation I wrote a conversion script so I could use CVS locally and then daily import changes to the Harvest system while I was sleeping. The corp was fanatic about using Harvest, despite 80% of the programmers crying for something different. It was needlessly complicated, slow and heavy. It is now a job requirement for me that Harvest is not in use where I work. Has anyone else used Harvest before? What's your experience? As bad as mine? Did you employ other, different workarounds? Why is this product still purchased today?
versioncontrol
null
null
null
null
null
open
Why is Harvest being purchased at all? === Does your work environment use Harvest SCM? I've used this now at two different locations and find it appalling. In one situation I wrote a conversion script so I could use CVS locally and then daily import changes to the Harvest system while I was sleeping. The corp was fanatic about using Harvest, despite 80% of the programmers crying for something different. It was needlessly complicated, slow and heavy. It is now a job requirement for me that Harvest is not in use where I work. Has anyone else used Harvest before? What's your experience? As bad as mine? Did you employ other, different workarounds? Why is this product still purchased today?
0
26,195
08/25/2008 15:10:27
24
08/01/2008 12:12:53
11
2
vimdiff and CVS integration
I've always wanted to be able to get a reasonably elegant way of getting vimdiff to work with a CVS controlled file. I've found numerous (somewhat hacky) scripts around the internet (best example [here][1]) that basically check out the file you are editing from CVS to a temp file, and vimdiff the two. None of these take into account branches, and always assume you're working from MAIN, which for me is completely useless. So, my question is this: has anyone out there found a decent solution for this that does more than this script? Or failing that, does anyone have any ideas of how they would implement this, or suggestions for what features you would consider vital for something that does this? My intention is that, if no one can suggest an already built solution to either use or build from, we start building one from here. [1]: http://www.vim.org/tips/tip.php?tip_id=390
vim
cvs
vimdiff
null
null
null
open
vimdiff and CVS integration === I've always wanted to be able to get a reasonably elegant way of getting vimdiff to work with a CVS controlled file. I've found numerous (somewhat hacky) scripts around the internet (best example [here][1]) that basically check out the file you are editing from CVS to a temp file, and vimdiff the two. None of these take into account branches, and always assume you're working from MAIN, which for me is completely useless. So, my question is this: has anyone out there found a decent solution for this that does more than this script? Or failing that, does anyone have any ideas of how they would implement this, or suggestions for what features you would consider vital for something that does this? My intention is that, if no one can suggest an already built solution to either use or build from, we start building one from here. [1]: http://www.vim.org/tips/tip.php?tip_id=390
0
26,196
08/25/2008 15:11:10
2,470
08/22/2008 12:42:38
61
17
Filtering collections in C#
I am looking for a very fast way to filter down a collection in C#. I am currently using generic List&lt;object&gt; collections, but am open to using other structures if they perform better. Currently, I am just creating a new List&lt;object&gt; and looping thru the original list. If the filtering criteria matches, I put a copy into the new list. Is there a better way to do this? Is there a way to filter in place so there is no temporary list required?
c#
collections
filtering
null
null
null
open
Filtering collections in C# === I am looking for a very fast way to filter down a collection in C#. I am currently using generic List&lt;object&gt; collections, but am open to using other structures if they perform better. Currently, I am just creating a new List&lt;object&gt; and looping thru the original list. If the filtering criteria matches, I put a copy into the new list. Is there a better way to do this? Is there a way to filter in place so there is no temporary list required?
0
26,229
08/25/2008 15:22:17
1,782
08/18/2008 14:30:58
817
48
Visio and Forward-Engineering
Do you know if I can use Visio to forward-engineer a sequence diagram into code (c#)? Can it be done with Visio alone or do I need a plugin? What about other diagrams?
c#
visio
forward-engineer
null
null
null
open
Visio and Forward-Engineering === Do you know if I can use Visio to forward-engineer a sequence diagram into code (c#)? Can it be done with Visio alone or do I need a plugin? What about other diagrams?
0
26,230
08/25/2008 15:22:19
29
08/01/2008 12:24:53
69
10
Revoke shared folders in windows
Over the last few months/years, I have shared a folder or two with numerous people on my domain. How do I easily revoke those shares to keep access to my system nice and tidy?
windows
networking
folders
smb
shared
null
open
Revoke shared folders in windows === Over the last few months/years, I have shared a folder or two with numerous people on my domain. How do I easily revoke those shares to keep access to my system nice and tidy?
0
26,233
08/25/2008 15:23:05
2,141
08/20/2008 14:38:34
152
3
Fastest C# Code to Download a Web Page
Given a URL, what would be the most efficient code to download the contents of that web page? I am only considering the HTML, not associated images, JS and CSS.
c#
null
null
null
null
null
open
Fastest C# Code to Download a Web Page === Given a URL, what would be the most efficient code to download the contents of that web page? I am only considering the HTML, not associated images, JS and CSS.
0
26,255
08/25/2008 15:29:39
399
08/05/2008 13:08:21
211
5
Reserved Keywords in Javascript
What Javascript keywords (function names, variables, etc) are reserved?
javascript
null
null
null
null
null
open
Reserved Keywords in Javascript === What Javascript keywords (function names, variables, etc) are reserved?
0
26,260
08/25/2008 15:32:46
2,385
08/22/2008 00:18:38
23
4
Asp.net website first start is very slow
The first time I load the website in the production web server, it start very slow, subsequent pages load very quickly (included the home page). I precompiled the site, but nothing changes. I don't have any code at Application start. I don't have cached items. Any ideas? How can I find out what is happening?
asp.net
null
null
null
null
null
open
Asp.net website first start is very slow === The first time I load the website in the production web server, it start very slow, subsequent pages load very quickly (included the home page). I precompiled the site, but nothing changes. I don't have any code at Application start. I don't have cached items. Any ideas? How can I find out what is happening?
0
26,301
08/25/2008 15:55:42
269
08/04/2008 10:13:44
1,536
105
Your favourite algorithm and the lesson it taught you.
What algorithm taught you the most about programming or a specific language feature? We have all had those moments where all of a sudden we know, just know, we have learned an important lesson for the future based on finally understanding an algorithm written by a programmer a couple of steps up the evolutionary ladder. Whose ideas and code had the magic touch on you?
language-agnostic
algorithm
null
null
null
null
open
Your favourite algorithm and the lesson it taught you. === What algorithm taught you the most about programming or a specific language feature? We have all had those moments where all of a sudden we know, just know, we have learned an important lesson for the future based on finally understanding an algorithm written by a programmer a couple of steps up the evolutionary ladder. Whose ideas and code had the magic touch on you?
0
26,305
08/25/2008 16:00:04
2,644
08/23/2008 21:56:47
71
6
How can I play sound in Java?
I want to be able to play sound files in my program. Where should I look?
java
audio
null
null
null
null
open
How can I play sound in Java? === I want to be able to play sound files in my program. Where should I look?
0
26,323
08/25/2008 16:05:29
2,141
08/20/2008 14:38:34
150
3
Regex to Parse Hyperlinks and Descriptions
C#: What is a good Regex to parse hyperlinks and their description? Please consider case insensitivity, whitespace and use of single quotes (instead of double quotes) around the HREF tag.
regex
null
null
null
null
null
open
Regex to Parse Hyperlinks and Descriptions === C#: What is a good Regex to parse hyperlinks and their description? Please consider case insensitivity, whitespace and use of single quotes (instead of double quotes) around the HREF tag.
0
26,354
08/25/2008 16:34:25
620,435
08/25/2008 16:34:25
1
0
Print a barcode to a Intermec PB20 via the LinePrinter API
Does anyone know how to print a barcode to the Intermec PB20 bluetooth printer from a Windows Compact Framework application> We are currently using the Intermec LinePrinter API but have been unable to find a way to print a barcode.
c#
windows-mobile
null
null
null
null
open
Print a barcode to a Intermec PB20 via the LinePrinter API === Does anyone know how to print a barcode to the Intermec PB20 bluetooth printer from a Windows Compact Framework application> We are currently using the Intermec LinePrinter API but have been unable to find a way to print a barcode.
0
26,355
08/25/2008 16:36:31
636
08/07/2008 12:32:33
323
26
Compact Framework - Is there an MVC framework/library available?
I've found [an article][1] on this subject by a Microsoft employee, but has anyone implemented a more robust framework for this? Is there a lightweight framework for WinForms that could be ported easily? I'd like to get up to speed fairly quickly and avoid producing a framework/library of my own to handle this when someone smarter has already done this. I haven't looked at the [Mobile Software Factory][2] from the P&P group, but I suspect it's kind of heavy. Is it worth a look? [1]: http://blogs.msdn.com/priozersk/archive/2007/08/06/implementing-mvc-pattern-in-net-cf-applications-part-1.aspx [2]: http://msdn.microsoft.com/en-us/library/aa480471.aspx
compactframework
csharp
mvc
patterns
windows-mobile
null
open
Compact Framework - Is there an MVC framework/library available? === I've found [an article][1] on this subject by a Microsoft employee, but has anyone implemented a more robust framework for this? Is there a lightweight framework for WinForms that could be ported easily? I'd like to get up to speed fairly quickly and avoid producing a framework/library of my own to handle this when someone smarter has already done this. I haven't looked at the [Mobile Software Factory][2] from the P&P group, but I suspect it's kind of heavy. Is it worth a look? [1]: http://blogs.msdn.com/priozersk/archive/2007/08/06/implementing-mvc-pattern-in-net-cf-applications-part-1.aspx [2]: http://msdn.microsoft.com/en-us/library/aa480471.aspx
0
26,362
08/25/2008 16:39:42
822
08/09/2008 04:54:20
116
7
Using ItemizedOverlay and OverlayItem In Android Beta 0.9
Has anyone managed to use ItemizedOverlays in Android Beta 0.9? I can't get it to work, but I'm not sure if I've done something wrong or if this functionality isn't yet available. I've been trying to use the ItemizedOverlay and OverlayItem classes. Their intended purpose is to simulate map markers (as seen in Google Maps Mashups) but I've had problems getting them to appear on the map. I can add my own custom overlays using a similar technique, it's just the ItemizedOverlays that don't work. Once I've implemented my own ItemizedOverlay (and overriden createItem), creating a new instance of my class seems to work (I can extract OverlayItems from it) but adding it to a map's Overlay list doesn't make it appear as it should. This is the code I use to add the ItemizedOverlay class as an Overlay on to my Map View. // Add the ItemizedOverlay to the Map private void addItemizedOverlay() { Resources r = getResources(); MapView mapView = (MapView)findViewById(R.id.mymapview); List<Overlay> overlays = mapView.getOverlays(); MyItemizedOverlay markers = new MyItemizedOverlay(r.getDrawable(R.drawable.icon)); overlays.add(markers); OverlayItem oi = markers.getItem(0); markers.setFocus(oi); mapView.postInvalidate(); } Where MyItemizedOverlay is defined as: public class MyItemizedOverlay extends ItemizedOverlay<OverlayItem> { public MyItemizedOverlay(Drawable defaultMarker) { super(defaultMarker); populate(); } @Override protected OverlayItem createItem(int index) { Double lat = (index+37.422006)*1E6; Double lng = -122.084095*1E6; GeoPoint point = new GeoPoint(lat.intValue(), lng.intValue()); OverlayItem oi = new OverlayItem(point, "Marker", "Marker Text"); return oi; } @Override public int size() { return 5; } }
android
overlay
android-mapview
null
null
null
open
Using ItemizedOverlay and OverlayItem In Android Beta 0.9 === Has anyone managed to use ItemizedOverlays in Android Beta 0.9? I can't get it to work, but I'm not sure if I've done something wrong or if this functionality isn't yet available. I've been trying to use the ItemizedOverlay and OverlayItem classes. Their intended purpose is to simulate map markers (as seen in Google Maps Mashups) but I've had problems getting them to appear on the map. I can add my own custom overlays using a similar technique, it's just the ItemizedOverlays that don't work. Once I've implemented my own ItemizedOverlay (and overriden createItem), creating a new instance of my class seems to work (I can extract OverlayItems from it) but adding it to a map's Overlay list doesn't make it appear as it should. This is the code I use to add the ItemizedOverlay class as an Overlay on to my Map View. // Add the ItemizedOverlay to the Map private void addItemizedOverlay() { Resources r = getResources(); MapView mapView = (MapView)findViewById(R.id.mymapview); List<Overlay> overlays = mapView.getOverlays(); MyItemizedOverlay markers = new MyItemizedOverlay(r.getDrawable(R.drawable.icon)); overlays.add(markers); OverlayItem oi = markers.getItem(0); markers.setFocus(oi); mapView.postInvalidate(); } Where MyItemizedOverlay is defined as: public class MyItemizedOverlay extends ItemizedOverlay<OverlayItem> { public MyItemizedOverlay(Drawable defaultMarker) { super(defaultMarker); populate(); } @Override protected OverlayItem createItem(int index) { Double lat = (index+37.422006)*1E6; Double lng = -122.084095*1E6; GeoPoint point = new GeoPoint(lat.intValue(), lng.intValue()); OverlayItem oi = new OverlayItem(point, "Marker", "Marker Text"); return oi; } @Override public int size() { return 5; } }
0
26,366
08/25/2008 16:40:44
1,799
08/18/2008 15:52:48
139
43
Beyond design patterns?
For the past 10 years or so there have been a smattering of articles and papers referencing Christopher Alexander's newer work "The Nature of Order" and how it can be applied to software. Unfortunately, the only works I can find are from James Coplien and Richard Gabriel; there is nothing beyond that, at least from my attempts to find such things through google. Is this kind of discussion happening anywhere? MSN
design-patterns
null
null
null
null
null
open
Beyond design patterns? === For the past 10 years or so there have been a smattering of articles and papers referencing Christopher Alexander's newer work "The Nature of Order" and how it can be applied to software. Unfortunately, the only works I can find are from James Coplien and Richard Gabriel; there is nothing beyond that, at least from my attempts to find such things through google. Is this kind of discussion happening anywhere? MSN
0
26,369
08/25/2008 16:43:06
2,868
08/25/2008 16:43:06
1
0
What is the best way to store user settings for a .NET applications?
I have a .NET 2.0 Windows Forms application. Where is the best place the store user settings (considering Windows guidelines)? Some people pointed to Application.LocalUserAppDataPath. However, that creates a folder structure like: C:\Documents and Settings\user_name\Local Settings\Application Data\company_name\product_name\product_version\ If I release version 1 of my application and store an XML file there, then release version 2, that would change to a different folder, right? I'd prefer to have a single folder, per user, to store settings, regardless of the application version. Thanks!
.net
c#
null
null
null
null
open
What is the best way to store user settings for a .NET applications? === I have a .NET 2.0 Windows Forms application. Where is the best place the store user settings (considering Windows guidelines)? Some people pointed to Application.LocalUserAppDataPath. However, that creates a folder structure like: C:\Documents and Settings\user_name\Local Settings\Application Data\company_name\product_name\product_version\ If I release version 1 of my application and store an XML file there, then release version 2, that would change to a different folder, right? I'd prefer to have a single folder, per user, to store settings, regardless of the application version. Thanks!
0
26,383
08/25/2008 16:52:23
1,144
08/12/2008 19:00:54
125
9
Exception handling: Contract vs Exceptional approach
I know two approaches to Exception handling, lets have a look at them. 1. Contract approach. When a method does not do what it says it will do in the method header, it will throw an exception. Thus the method "promises" that it will do the operation, and if it fails for some reason, it will throw an exception. 2. Exceptional approach. Only throw exceptions when something truly weird happens. You should not use exceptions when you can resolve the situation with normal control flow (If statements). You don't use Exceptions for control flow, as you might in the contract approach. Lets use both approaches in different cases: We have a Customer class that has a method called OrderProduct. contract approach: class Customer { public void OrderProduct(Product product) { if((m_credit - product.Price) < 0) throw new NoCreditException("Not enough credit!"); // do stuff } } exceptional approach: class Customer { public bool OrderProduct(Product product) { if((m&#95;credit - product.Price) < 0) return false; // do stuff return true; } } if !(customer.OrderProduct(product)) Console.WriteLine("Not enough credit!"); else // go on with your life Here I prefer the exceptional approach, as it is not truly Exceptional that a customer has no money assuming he did not win the lottery. But here is a situation I err on the contract style. Exceptional: class CarController { // returns null if car creation failed. public Car CreateCar(string model) { // something went wrong, wrong model return null; } } When I call a method called CreateCar, I damn wel expect a Car instance and some lousy null pointer, which can ravage my running code a dozen lines later. Thus I prefer contract to this one: class CarController { public Car CreateCar(string model) { // something went wrong, wrong model throw new CarModelNotKnownException("Model unkown"); return new Car(); } } Which do style do you use? What do you think is best general approach to Exceptions?
exception
null
null
null
null
null
open
Exception handling: Contract vs Exceptional approach === I know two approaches to Exception handling, lets have a look at them. 1. Contract approach. When a method does not do what it says it will do in the method header, it will throw an exception. Thus the method "promises" that it will do the operation, and if it fails for some reason, it will throw an exception. 2. Exceptional approach. Only throw exceptions when something truly weird happens. You should not use exceptions when you can resolve the situation with normal control flow (If statements). You don't use Exceptions for control flow, as you might in the contract approach. Lets use both approaches in different cases: We have a Customer class that has a method called OrderProduct. contract approach: class Customer { public void OrderProduct(Product product) { if((m_credit - product.Price) < 0) throw new NoCreditException("Not enough credit!"); // do stuff } } exceptional approach: class Customer { public bool OrderProduct(Product product) { if((m&#95;credit - product.Price) < 0) return false; // do stuff return true; } } if !(customer.OrderProduct(product)) Console.WriteLine("Not enough credit!"); else // go on with your life Here I prefer the exceptional approach, as it is not truly Exceptional that a customer has no money assuming he did not win the lottery. But here is a situation I err on the contract style. Exceptional: class CarController { // returns null if car creation failed. public Car CreateCar(string model) { // something went wrong, wrong model return null; } } When I call a method called CreateCar, I damn wel expect a Car instance and some lousy null pointer, which can ravage my running code a dozen lines later. Thus I prefer contract to this one: class CarController { public Car CreateCar(string model) { // something went wrong, wrong model throw new CarModelNotKnownException("Model unkown"); return new Car(); } } Which do style do you use? What do you think is best general approach to Exceptions?
0
26,393
08/25/2008 16:59:09
1,266
08/14/2008 06:27:57
177
18
What is a selector engine?
I've seen news of [John Resig's fast new selector engine named Sizzle][1] pop up in quite a few places, but I don't know what a selector engine is, nor have any of the articles given an explanation of what it is. I know Resig is the creator of jQuery, and that Sizzle is something in Javascript, but beyond that I don't know what it is. So, what is a selector engine? Thanks! [1]: http://github.com/jeresig/sizzle/tree/master
javascript
jquery
resig
null
null
null
open
What is a selector engine? === I've seen news of [John Resig's fast new selector engine named Sizzle][1] pop up in quite a few places, but I don't know what a selector engine is, nor have any of the articles given an explanation of what it is. I know Resig is the creator of jQuery, and that Sizzle is something in Javascript, but beyond that I don't know what it is. So, what is a selector engine? Thanks! [1]: http://github.com/jeresig/sizzle/tree/master
0
26,422
08/25/2008 17:11:07
1,782
08/18/2008 14:30:58
817
48
Third party Visual Studio snippets
Do you know where I could find some useful third party (free) code snippets for VS 2008?
free
code-snippets
visual-studio
null
null
null
open
Third party Visual Studio snippets === Do you know where I could find some useful third party (free) code snippets for VS 2008?
0
26,433
08/25/2008 17:18:50
437
08/05/2008 18:13:45
1,263
39
Bash One Liner: copy template_*.txt to foo_*.txt?
Say I have three files (template_*.txt): - template_x.txt - template_y.txt - template_z.txt I want to copy them to three new files (foo_*.txt). - foo_x.txt - foo_y.txt - foo_z.txt Is there some simple way to do that with one command, e.g. <code>cp --enableAwesomeness template_\*.txt foo_\*.txt</code>
bash
null
null
null
null
null
open
Bash One Liner: copy template_*.txt to foo_*.txt? === Say I have three files (template_*.txt): - template_x.txt - template_y.txt - template_z.txt I want to copy them to three new files (foo_*.txt). - foo_x.txt - foo_y.txt - foo_z.txt Is there some simple way to do that with one command, e.g. <code>cp --enableAwesomeness template_\*.txt foo_\*.txt</code>
0
26,436
08/25/2008 17:19:55
2,494
08/22/2008 14:29:22
18
6
RSS Feed Library for (Unmanaged) C++
I'm looking for an rss library I can integrate into an existing windows MFC/C++ application. Does anyone know of such a thing? Or am I not finding one because people tend to use one of the many XML libraries out there and just enhance them to be specific to rss feeds?
c++
rss
null
null
null
null
open
RSS Feed Library for (Unmanaged) C++ === I'm looking for an rss library I can integrate into an existing windows MFC/C++ application. Does anyone know of such a thing? Or am I not finding one because people tend to use one of the many XML libraries out there and just enhance them to be specific to rss feeds?
0
26,437
08/25/2008 17:20:19
2,644
08/23/2008 21:56:47
83
9
Book recommendation for Java good practices
After reading some Java beginners books and being comfortable with Java, what should I read next in order to write better/standard code?
java
books
null
null
null
12/15/2011 13:07:34
not constructive
Book recommendation for Java good practices === After reading some Java beginners books and being comfortable with Java, what should I read next in order to write better/standard code?
4
26,450
08/25/2008 17:25:22
2,875
08/25/2008 17:25:22
1
0
Hibernate saveOrUpdate with another object in the session
Is there any way to save an object using Hibernate if there is already an object using that identifier loaded into the session? - Doing session.contains(obj) seems to only return true if the session contains that exact object, not another object with the same ID. - Using merge(obj) throws an exception if the object is new
java
orm
hibernate
null
null
null
open
Hibernate saveOrUpdate with another object in the session === Is there any way to save an object using Hibernate if there is already an object using that identifier loaded into the session? - Doing session.contains(obj) seems to only return true if the session contains that exact object, not another object with the same ID. - Using merge(obj) throws an exception if the object is new
0
26,452
08/25/2008 17:25:33
40
08/01/2008 12:48:12
2,143
181
Visual Studio 2005 Shortcuts
I'm trying to bind the following shortcut: **Ctrl + W** to close tabs How can you customize VS to add/change shortcuts? Also, what are the most useful shortcuts you guys have found?
vs2005
shortcuts
visual-studio
null
null
null
open
Visual Studio 2005 Shortcuts === I'm trying to bind the following shortcut: **Ctrl + W** to close tabs How can you customize VS to add/change shortcuts? Also, what are the most useful shortcuts you guys have found?
0
26,455
08/25/2008 17:26:47
290
08/04/2008 12:57:50
441
49
Does Design By Contract Work For You?
Do you use Design by Contract professionally? Is it something you have to do from the beginning of a project, or can you change gears and start to incorporate it into your software development lifecycle? What have you found to be the pros/cons of the design approach? I came across the [Design by Contract][1] approach in a grad school course. In the academic setting, it seemed to be a pretty useful technique. But I don't currently use Design by Contract professionally, and I don't know any other developers that are using it. It would be good to hear about its actual usage from the SO crowd. [1]: http://en.wikipedia.org/wiki/Design_by_contract
contract-programming
design-by-contract
design
contract-first-developme
null
10/21/2011 12:43:57
not constructive
Does Design By Contract Work For You? === Do you use Design by Contract professionally? Is it something you have to do from the beginning of a project, or can you change gears and start to incorporate it into your software development lifecycle? What have you found to be the pros/cons of the design approach? I came across the [Design by Contract][1] approach in a grad school course. In the academic setting, it seemed to be a pretty useful technique. But I don't currently use Design by Contract professionally, and I don't know any other developers that are using it. It would be good to hear about its actual usage from the SO crowd. [1]: http://en.wikipedia.org/wiki/Design_by_contract
4
26,458
08/25/2008 17:27:19
2,875
08/25/2008 17:25:22
1
0
IDE for Swing
Is there any IDE that simplifies creating Swing applications (ideally something along the lines of Visual Studio)
swing
ide
null
null
null
04/27/2012 15:03:58
not constructive
IDE for Swing === Is there any IDE that simplifies creating Swing applications (ideally something along the lines of Visual Studio)
4
26,478
08/25/2008 17:38:50
2,327
08/21/2008 16:44:15
1
0
Incosistency between MS Sql 2k and 2k5 with columns as function arguments
I'm having trouble getting the following to work in Sql Server 2k, but it works in 2k5: --works in 2k5, not in 2k create view foo as SELECT usertable.legacyCSVVarcharCol as testvar FROM usertable WHERE rsrcID in ( select val from dbo.fnSplitStringToInt( usertable.legacyCSVVarcharCol, default) ) --error message: Msg 170, Level 15, State 1, Procedure foo, Line 4 Line 25: Incorrect syntax near '.'. So, legacyCSVVarcharCol is a column containing comma-seperated lists of ints. I realize that this is a huge WTF, but this is legacy code, and there's nothing that can be done about the schema right now. Passing "testvar" as the argument to the function doesn't work in 2k either. Passing a hardcoded string as the argument to fnSplitStringToInt works in both 2k and 2k5. Does anyone know why this doesn't work in 2k? Is this perhaps a known bug in the query planner? Any suggestions for how to make it work? Again, I realize that the real answer is "don't store CSV lists in your DB!", but alas, that's beyond my control.
mssql
sql-server
null
null
null
null
open
Incosistency between MS Sql 2k and 2k5 with columns as function arguments === I'm having trouble getting the following to work in Sql Server 2k, but it works in 2k5: --works in 2k5, not in 2k create view foo as SELECT usertable.legacyCSVVarcharCol as testvar FROM usertable WHERE rsrcID in ( select val from dbo.fnSplitStringToInt( usertable.legacyCSVVarcharCol, default) ) --error message: Msg 170, Level 15, State 1, Procedure foo, Line 4 Line 25: Incorrect syntax near '.'. So, legacyCSVVarcharCol is a column containing comma-seperated lists of ints. I realize that this is a huge WTF, but this is legacy code, and there's nothing that can be done about the schema right now. Passing "testvar" as the argument to the function doesn't work in 2k either. Passing a hardcoded string as the argument to fnSplitStringToInt works in both 2k and 2k5. Does anyone know why this doesn't work in 2k? Is this perhaps a known bug in the query planner? Any suggestions for how to make it work? Again, I realize that the real answer is "don't store CSV lists in your DB!", but alas, that's beyond my control.
0
26,509
08/25/2008 17:55:58
1,574
08/16/2008 19:31:12
236
16
What workshops / user groups / conventions do you attend?
I haven't been to enough of these "live" events to really determine which, if any, are worth the time / money. Which ones do you attend and why?
networking
null
null
null
null
null
open
What workshops / user groups / conventions do you attend? === I haven't been to enough of these "live" events to really determine which, if any, are worth the time / money. Which ones do you attend and why?
0
26,512
08/25/2008 17:56:40
1,638
08/17/2008 17:58:57
197
18
Can I add an event listener to a databinding action in Flex?
I have a ComboBox that I bind to a standard HTTPService, I would like to add an event listener so that I can run some code after the ComboBox is populated from the data provider. How can I do this?
flex
null
null
null
null
null
open
Can I add an event listener to a databinding action in Flex? === I have a ComboBox that I bind to a standard HTTPService, I would like to add an event listener so that I can run some code after the ComboBox is populated from the data provider. How can I do this?
0
26,515
08/25/2008 17:59:28
2,025
08/19/2008 20:59:50
695
83
Using MySQLi - which is better for closing queries
I have a habit of keeping my variable usage to a bare minimum. So I'm wondering if there is any advantage to be gained by the following: $query = $mysqli->query('SELECT * FROM `people` ORDER BY `name` ASC LIMIT 0,30'); // Example 1 $query = $query->fetch_assoc(); // Example 2 $query_r = $query->fetch_assoc(); $query->free(); Now if I'm right Example 1 should be more efficient as `$query` is `unset` when I reassign it which should free any memory associated with it. However there is a method (`MySQLi_Result::free()`) which frees associated memory - is this the same thing? If I don't call `::free()` to free any memory associated with the result but `unset` it by reassigning the variable am I doing the same thing? I don't know how to log this sort of thing - does anyone have some ideas?
php
memory
mysqli
null
null
null
open
Using MySQLi - which is better for closing queries === I have a habit of keeping my variable usage to a bare minimum. So I'm wondering if there is any advantage to be gained by the following: $query = $mysqli->query('SELECT * FROM `people` ORDER BY `name` ASC LIMIT 0,30'); // Example 1 $query = $query->fetch_assoc(); // Example 2 $query_r = $query->fetch_assoc(); $query->free(); Now if I'm right Example 1 should be more efficient as `$query` is `unset` when I reassign it which should free any memory associated with it. However there is a method (`MySQLi_Result::free()`) which frees associated memory - is this the same thing? If I don't call `::free()` to free any memory associated with the result but `unset` it by reassigning the variable am I doing the same thing? I don't know how to log this sort of thing - does anyone have some ideas?
0
26,536
08/25/2008 18:07:57
1,942
08/19/2008 14:45:43
69
10
Active X Control JavaScript
My coworker and I have encountered a nasty situation where we have to use an active X control to manipulate a web camera on a page. Is it possible to assign a javascript event handler to a button in the active x control so that it would fire an action on the page when clicked, or do we have to create an button on the html page it self that manipulates the Active X Control and then can fire any necessary actions on the page?
javascript
null
null
null
null
null
open
Active X Control JavaScript === My coworker and I have encountered a nasty situation where we have to use an active X control to manipulate a web camera on a page. Is it possible to assign a javascript event handler to a button in the active x control so that it would fire an action on the page when clicked, or do we have to create an button on the html page it self that manipulates the Active X Control and then can fire any necessary actions on the page?
0
26,547
08/25/2008 18:13:40
2,644
08/23/2008 21:56:47
135
13
How to detect which blog API
Let's say that you want to create a dead simple BlogEditor and, one of your ideas, is to do what Live Writer does and ask only the URL of the persons Blog. How can you detect what type of blog is it? Basic detection can be done with the URL itself, such as http://myblog.blogger.com etc. But what if it's self hosted? I'm mostly interested on how to do this in Java, but this question could be also used as a reference for any other language.
java
api
blogs
null
null
null
open
How to detect which blog API === Let's say that you want to create a dead simple BlogEditor and, one of your ideas, is to do what Live Writer does and ask only the URL of the persons Blog. How can you detect what type of blog is it? Basic detection can be done with the URL itself, such as http://myblog.blogger.com etc. But what if it's self hosted? I'm mostly interested on how to do this in Java, but this question could be also used as a reference for any other language.
0
26,551
08/25/2008 18:14:18
730
08/08/2008 12:40:04
90
16
How to Pass Command Line Parameters in batch file
I needed to pass id and password to a cmd (or bat) file at the time of running rather than hardcoding them into the file. Here's how I do it. echo off fake-command /u %1 /p %2 Here's what the command line looks like: test.cmd admin P@55w0rd > test-log.txt The %1 applies to the first parameter the %2 (and here's the tricky part) applies to the second. You can have up to 9 parameters passed in this way. Afterward: This is my first attempt to answer my own question which, to hear Jeff disscuss it is a "...perfectly acceptable...." way of using SO. I'm just not certain if there's already a format for doing it.
ms-dos
cmd
batch-file
batch
command-line
null
open
How to Pass Command Line Parameters in batch file === I needed to pass id and password to a cmd (or bat) file at the time of running rather than hardcoding them into the file. Here's how I do it. echo off fake-command /u %1 /p %2 Here's what the command line looks like: test.cmd admin P@55w0rd > test-log.txt The %1 applies to the first parameter the %2 (and here's the tricky part) applies to the second. You can have up to 9 parameters passed in this way. Afterward: This is my first attempt to answer my own question which, to hear Jeff disscuss it is a "...perfectly acceptable...." way of using SO. I'm just not certain if there's already a format for doing it.
0