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
47,711
09/06/2008 18:31:25
4,924
09/06/2008 17:56:09
11
1
How do you determine how far to normalize a database?
When creating a database structure, what are good guidelines to follow or good ways to determine how far a database should be normalized? Should you create an un-normalized database and split it apart as the project progresses? Should you create it fully normalized and combine tables as needed for performance?
database-design
language-agnostic
null
null
null
null
open
How do you determine how far to normalize a database? === When creating a database structure, what are good guidelines to follow or good ways to determine how far a database should be normalized? Should you create an un-normalized database and split it apart as the project progresses? Should you create it fully normalized and combine tables as needed for performance?
0
47,740
09/06/2008 19:04:06
445,815
09/06/2008 18:18:39
1
2
What are some good LINQ resouces?
I have just finished reading "LINQ in Action" which I have found to be a great resource. What are some other resources available?
linq
null
null
null
null
null
open
What are some good LINQ resouces? === I have just finished reading "LINQ in Action" which I have found to be a great resource. What are some other resources available?
0
47,749
09/06/2008 19:13:08
1,324,220
08/23/2008 19:01:43
425
28
Are mocks better than stubs?
A while ago I read the [Mocks Aren't Stubs][1] article by Martin Fowler and I must admit I'm a bit scared of external dependencies with regards to added complexity so I would like to ask: What is the best method to use when unit testing? Is it better to always use a mock framework to automatically mock the dependencies of the method being tested, or would you prefer to use simpler mechanisms like for instance test stubs? [1]: http://www.martinfowler.com/articles/mocksArentStubs.html
unit-testing
mocking
null
null
null
null
open
Are mocks better than stubs? === A while ago I read the [Mocks Aren't Stubs][1] article by Martin Fowler and I must admit I'm a bit scared of external dependencies with regards to added complexity so I would like to ask: What is the best method to use when unit testing? Is it better to always use a mock framework to automatically mock the dependencies of the method being tested, or would you prefer to use simpler mechanisms like for instance test stubs? [1]: http://www.martinfowler.com/articles/mocksArentStubs.html
0
47,752
09/06/2008 19:15:27
4,541
09/04/2008 17:37:04
30
1
Remove duplicates from a List<T> in C#
Anyone have a quick method for de-duplicating a generic List<T> in C#?
c#
generics
null
null
null
null
open
Remove duplicates from a List<T> in C# === Anyone have a quick method for de-duplicating a generic List<T> in C#?
0
47,762
09/06/2008 19:29:56
4,418
09/03/2008 15:54:27
21
2
How-to: Ranking Search Results
I have a webapp development problem that I've developed one solution for, but am trying to find other ideas that might get around some performance issues I'm seeing. problem statement: - a user enters several keywords/tokens - the application searches for matches to the tokens - need one result for each token - ie, if an entry has 3 tokens, i need the entry id 3 times - rank the results - assign X points for token match - sort the entry ids based on points - if point values are the same, use date to sort results What I want to be able to do, but have not figured out, is to send 1 query that returns something akin to the results of an in(), but returns a duplicate entry id for each token matches for each entry id checked. Is there a better way to do this than what I'm doing, of using multiple, individual queries running one query per token? If so, what's the easiest way to implement those?
php
mysql
search
null
null
null
open
How-to: Ranking Search Results === I have a webapp development problem that I've developed one solution for, but am trying to find other ideas that might get around some performance issues I'm seeing. problem statement: - a user enters several keywords/tokens - the application searches for matches to the tokens - need one result for each token - ie, if an entry has 3 tokens, i need the entry id 3 times - rank the results - assign X points for token match - sort the entry ids based on points - if point values are the same, use date to sort results What I want to be able to do, but have not figured out, is to send 1 query that returns something akin to the results of an in(), but returns a duplicate entry id for each token matches for each entry id checked. Is there a better way to do this than what I'm doing, of using multiple, individual queries running one query per token? If so, what's the easiest way to implement those?
0
47,780
09/06/2008 19:57:58
445,087
09/02/2008 17:25:48
26
3
Is there a way to parse a dependency tree from a build script output?
I have an inherited project that uses a build script (not make) to build and link the project with various libraries. When it performs a build I would like to parse the build output to determine what and where the actual static libraries being linked into the final executable are and where are they coming from. The script is compiling and linking with GNU tools.
c++
gcc
gnu
linker
null
null
open
Is there a way to parse a dependency tree from a build script output? === I have an inherited project that uses a build script (not make) to build and link the project with various libraries. When it performs a build I would like to parse the build output to determine what and where the actual static libraries being linked into the final executable are and where are they coming from. The script is compiling and linking with GNU tools.
0
47,786
09/06/2008 20:05:24
366
08/05/2008 06:49:49
113
4
Google App Engine: Is it possible to do a Gql LIKE query?
Simple one really. In SQL, if I want to search a text field for a couple of characters, I can do: SELECT blah FROM blah WHERE blah LIKE '%text%' The documentation for App Engine makes no mention of how to achieve this, but surely it's a common enough problem? Anthony
app-engine
gql
null
null
null
null
open
Google App Engine: Is it possible to do a Gql LIKE query? === Simple one really. In SQL, if I want to search a text field for a couple of characters, I can do: SELECT blah FROM blah WHERE blah LIKE '%text%' The documentation for App Engine makes no mention of how to achieve this, but surely it's a common enough problem? Anthony
0
47,789
09/06/2008 20:07:59
4,883
09/06/2008 10:24:59
23
0
Generator Expressions vs. List Comprehension
When should you use generator expressions vs. list comprehensions in Python and vice-versa? # Generator expression (x*2 for x in range(256)) # List comprehension [x*2 for x in range(256)]
python
null
null
null
null
null
open
Generator Expressions vs. List Comprehension === When should you use generator expressions vs. list comprehensions in Python and vice-versa? # Generator expression (x*2 for x in range(256)) # List comprehension [x*2 for x in range(256)]
0
47,801
09/06/2008 20:17:45
1,448
08/15/2008 16:16:35
349
23
User Authentication in Pylons + AuthKit
I am trying to create a web application using Pylons and the resources on the web point to the [PylonsBook][1] page which isn't of much help. I want authentication and authorisation and is there anyway to setup Authkit to work easily with Pylons? I tried downloading the [SimpleSiteTemplate][2] from the cheeseshop but wasn't able to run the setup-app command. It throws up an error: File "/home/cnu/env/lib/python2.5/site-packages/SQLAlchemy-0.4.7-py2.5.egg/sqlalchemy/schema.py", line 96, in __call__ table = metadata.tables[key] AttributeError: 'module' object has no attribute 'tables' I use Pylons 0.9.7rc1, SQLAlchemy 0.4.7, Authkit 0.4. [1]: http://pylonsbook.com/alpha1/authentication_and_authorization [2]: http://pypi.python.org/pypi/SimpleSiteTemplate/
python
authentication
pylons
sqlalchemy
authkit
null
open
User Authentication in Pylons + AuthKit === I am trying to create a web application using Pylons and the resources on the web point to the [PylonsBook][1] page which isn't of much help. I want authentication and authorisation and is there anyway to setup Authkit to work easily with Pylons? I tried downloading the [SimpleSiteTemplate][2] from the cheeseshop but wasn't able to run the setup-app command. It throws up an error: File "/home/cnu/env/lib/python2.5/site-packages/SQLAlchemy-0.4.7-py2.5.egg/sqlalchemy/schema.py", line 96, in __call__ table = metadata.tables[key] AttributeError: 'module' object has no attribute 'tables' I use Pylons 0.9.7rc1, SQLAlchemy 0.4.7, Authkit 0.4. [1]: http://pylonsbook.com/alpha1/authentication_and_authorization [2]: http://pypi.python.org/pypi/SimpleSiteTemplate/
0
47,817
09/06/2008 20:36:05
4,939
09/06/2008 20:36:05
1
0
Most elegant way to force a Textfield element to line-wrap, *regardless* of whitespace
Html Textfield elements only wrap when they reach a space or tab character. This is fine, until the user types a looooooooooooooooooooooong enough word. I'm looking for a way to strictly enforce line breaks (eg.: even if it results in "loooooooooooo \n ooooooooooong"). The best I've found is to add a zero-width unicode character after every letter, but this breaks copy and paste operations.
javascript
html
text
null
null
null
open
Most elegant way to force a Textfield element to line-wrap, *regardless* of whitespace === Html Textfield elements only wrap when they reach a space or tab character. This is fine, until the user types a looooooooooooooooooooooong enough word. I'm looking for a way to strictly enforce line breaks (eg.: even if it results in "loooooooooooo \n ooooooooooong"). The best I've found is to add a zero-width unicode character after every letter, but this breaks copy and paste operations.
0
47,824
09/06/2008 20:53:54
2,755
08/24/2008 21:39:28
13
0
Using core JQuery, how do you remove all the options of a select box, then add one option and select it?
My select box is the following <Select id="mySelect" size="9" </Select> thanks
javascript
jquery
null
null
null
null
open
Using core JQuery, how do you remove all the options of a select box, then add one option and select it? === My select box is the following <Select id="mySelect" size="9" </Select> thanks
0
47,827
09/06/2008 20:56:18
1,965
08/19/2008 15:51:08
3,138
190
HTML Compression and SEO?
At work, we have a dedicated SEO Analyst who's job is to pour over lots of data (KeyNote/Compete etc) and generate up fancy reports for the executives so they can see how we are doing against our competitors in organic search ranking. He also leads initiatives to improve the SEO rankings on our sites by optimizing things as best we can. We also have a longstanding mission to decrease our page load time, which right now is pretty shoddy on some pages. The SEO guy mentioned that semantic, valid HTML gets more points by crawlers than jumbled messy HTML. I've been working on a real time HTML compressor that will decrease our page sizes my a pretty good chunk. Will compressing the HTML hurt us in site rankings?
seo
html-compression
null
null
null
null
open
HTML Compression and SEO? === At work, we have a dedicated SEO Analyst who's job is to pour over lots of data (KeyNote/Compete etc) and generate up fancy reports for the executives so they can see how we are doing against our competitors in organic search ranking. He also leads initiatives to improve the SEO rankings on our sites by optimizing things as best we can. We also have a longstanding mission to decrease our page load time, which right now is pretty shoddy on some pages. The SEO guy mentioned that semantic, valid HTML gets more points by crawlers than jumbled messy HTML. I've been working on a real time HTML compressor that will decrease our page sizes my a pretty good chunk. Will compressing the HTML hurt us in site rankings?
0
47,833
09/06/2008 21:02:43
445,815
09/06/2008 18:18:39
8
2
In C#, what is the best way to test if a dataset is empty?
I know you can look at the row.count, but are there other ways to tell if a dataset is empty?
c#
.net
null
null
null
null
open
In C#, what is the best way to test if a dataset is empty? === I know you can look at the row.count, but are there other ways to tell if a dataset is empty?
0
47,837
09/06/2008 21:10:33
1,923
08/19/2008 14:18:40
51
3
Getting the base element from a jQuery object
I'm struggling to find the right terminology here, but if you have jQuery object... $('#MyObject') ...is it possible to extract the base element? Meaning, the equivalent of this: document.getElementById('MyObject')
jquery
null
null
null
null
null
open
Getting the base element from a jQuery object === I'm struggling to find the right terminology here, but if you have jQuery object... $('#MyObject') ...is it possible to extract the base element? Meaning, the equivalent of this: document.getElementById('MyObject')
0
47,838
09/06/2008 21:10:37
3,394
08/28/2008 12:35:39
1,655
78
Justification for Reflection in C#
I have wondered about the appropriateness of reflection in C# code. For example I have written a function which iterates through the properties of a given source object and creates a new instance of a specified type, then copies the values of properties with the same name from one to the other. I created this to copy data from one auto-generated LINQ object to another in order to get around the lack of inheritance from multiple tables in LINQ. However, I can't help but think code like this is really 'cheating', i.e. rather than using using the provided language constructs to achieve a given end it allows you to circumvent them. To what degree is this sort of code acceptable? What are the risks? What are legitimate uses of this approach?
c#
.net
reflection
null
null
null
open
Justification for Reflection in C# === I have wondered about the appropriateness of reflection in C# code. For example I have written a function which iterates through the properties of a given source object and creates a new instance of a specified type, then copies the values of properties with the same name from one to the other. I created this to copy data from one auto-generated LINQ object to another in order to get around the lack of inheritance from multiple tables in LINQ. However, I can't help but think code like this is really 'cheating', i.e. rather than using using the provided language constructs to achieve a given end it allows you to circumvent them. To what degree is this sort of code acceptable? What are the risks? What are legitimate uses of this approach?
0
47,845
09/06/2008 21:17:42
4,883
09/06/2008 10:24:59
65
0
Why is creating a new process more expensive on Windows than Linux?
I've heard that creating a new process on a Windows box is more expensive than on Linux. Is this true? Can somebody explain the technical reasons for why it's more expensive and provide any historical reasons for the design decisions behind those reasons?
windows
linux
performance
null
null
null
open
Why is creating a new process more expensive on Windows than Linux? === I've heard that creating a new process on a Windows box is more expensive than on Linux. Is this true? Can somebody explain the technical reasons for why it's more expensive and provide any historical reasons for the design decisions behind those reasons?
0
47,849
09/06/2008 21:21:10
4,906
09/06/2008 14:21:25
38
1
Refer /select a drive based only on it's LABEL? (i.e., not the drive letter?)
I'm trying to refer to a drive whose letter may change. I'd like to refer to it by its label (e.g., MyLabel (v:) within a Batch File. It can be referred to by V:\ . I'd like to refer to it by MyLabel. (This was posted on Experts Echange for a month with no answer. Let's see how fast SO answers it <g>)
batch
files
null
null
null
null
open
Refer /select a drive based only on it's LABEL? (i.e., not the drive letter?) === I'm trying to refer to a drive whose letter may change. I'd like to refer to it by its label (e.g., MyLabel (v:) within a Batch File. It can be referred to by V:\ . I'd like to refer to it by MyLabel. (This was posted on Experts Echange for a month with no answer. Let's see how fast SO answers it <g>)
0
47,854
09/06/2008 21:26:15
4,883
09/06/2008 10:24:59
70
0
How do you create a virtual network interface on Windows?
On linux, it's possible to create a tun interface using a tun driver which provides a "network interface psuedo-device" that can be treated as a regular network interface. Is there a way to do this programmatically on windows? Is there a way to do this without writing my own driver?
windows
networking
null
null
null
null
open
How do you create a virtual network interface on Windows? === On linux, it's possible to create a tun interface using a tun driver which provides a "network interface psuedo-device" that can be treated as a regular network interface. Is there a way to do this programmatically on windows? Is there a way to do this without writing my own driver?
0
47,862
09/06/2008 21:51:52
2,590
08/23/2008 12:23:18
327
15
Upgrade database from SQL Server 2000 to 2005 -- and rebuild full-text indexes?
I'm loading a SQL Server 2000 database into my new SQL Server 2005 instance. As expected, the full-text catalogs don't come with it. How can I rebuild them? Right-clicking my full text catalogs and hitting "rebuild indexes" just hangs for hours and hours without doing anything, so it doesn't appear to be that simple...
sql-server
full-text-search
recovery
null
null
null
open
Upgrade database from SQL Server 2000 to 2005 -- and rebuild full-text indexes? === I'm loading a SQL Server 2000 database into my new SQL Server 2005 instance. As expected, the full-text catalogs don't come with it. How can I rebuild them? Right-clicking my full text catalogs and hitting "rebuild indexes" just hangs for hours and hours without doing anything, so it doesn't appear to be that simple...
0
47,864
09/06/2008 21:54:07
91
08/01/2008 17:55:22
5,684
241
Handling HttpRequestValidationException gracefully and ASP.net AJAX compatible?
ValidateEvents is a great ASP.net function, but the Yellow Screen of Death is not so nice. I found a way how to handle the HttpRequestValidationException gracefully [here][1], but that does not work with ASP.net AJAX properly. Basically, I got an UpdatePanel with a TextBox and a Button, and when the user types in HTML into the Textbox, a JavaScript Popup with a Error message saying not to modify the Response pops up. So I wonder what is the best way to handle HttpRequestValidationException gracefully? For "normal" requests I would like to just display an error message, but when it's an AJAX Request i'd like to throw the request away and return something to indicate an error, so that my frontend page can react on it? [1]: http://www.romsteady.net/blog/2007/06/how-to-catch-httprequestvalidationexcep.html
asp.net
ajax
null
null
null
null
open
Handling HttpRequestValidationException gracefully and ASP.net AJAX compatible? === ValidateEvents is a great ASP.net function, but the Yellow Screen of Death is not so nice. I found a way how to handle the HttpRequestValidationException gracefully [here][1], but that does not work with ASP.net AJAX properly. Basically, I got an UpdatePanel with a TextBox and a Button, and when the user types in HTML into the Textbox, a JavaScript Popup with a Error message saying not to modify the Response pops up. So I wonder what is the best way to handle HttpRequestValidationException gracefully? For "normal" requests I would like to just display an error message, but when it's an AJAX Request i'd like to throw the request away and return something to indicate an error, so that my frontend page can react on it? [1]: http://www.romsteady.net/blog/2007/06/how-to-catch-httprequestvalidationexcep.html
0
47,869
09/06/2008 22:00:41
281
08/04/2008 12:13:17
23
2
Programatically determine how many Comments a blog post has
What is the most efficient way to determine how many comments a particular blog post has? We want to store the data for a new web app. We have a list of permalink URl's as well as the RSS feeds.
rss
comments
null
null
null
null
open
Programatically determine how many Comments a blog post has === What is the most efficient way to determine how many comments a particular blog post has? We want to store the data for a new web app. We have a list of permalink URl's as well as the RSS feeds.
0
47,882
09/06/2008 22:24:24
2,915
08/25/2008 23:15:12
1,717
76
What is a magic number, and why is it bad?
What is a magic number? Why should it be avoided? Are there cases where it's appropriate? -Adam
magicnumber
define
programming-terms
null
null
null
open
What is a magic number, and why is it bad? === What is a magic number? Why should it be avoided? Are there cases where it's appropriate? -Adam
0
47,883
09/06/2008 22:25:24
555
08/06/2008 16:43:59
1
1
How Does gcc on Solaris Find It's Libraries?
I'm trying to install 'quadrupel', a library that relies on ffmpeg on Solaris x86. I managed to build ffmpeg and its libraries live in /opt/gnu/lib and the includes are in /opt/gnu/include but when I try to build quadrupel, it can't find the ffmpeg headers. What flags/configuration is required to include those two directories in the proper search paths for libraries and includes? I'm not much of a Makefile hacker.
gcc
solaris
make
ffmpeg
null
null
open
How Does gcc on Solaris Find It's Libraries? === I'm trying to install 'quadrupel', a library that relies on ffmpeg on Solaris x86. I managed to build ffmpeg and its libraries live in /opt/gnu/lib and the includes are in /opt/gnu/include but when I try to build quadrupel, it can't find the ffmpeg headers. What flags/configuration is required to include those two directories in the proper search paths for libraries and includes? I'm not much of a Makefile hacker.
0
47,884
09/06/2008 22:26:48
3,394
08/28/2008 12:35:39
1,675
80
Is it worth learning to use MSBuild?
I simply wondered whether people thought it was worth learning to use the MSBuild syntax in order to customise the build process for a .net project, or whether it is really not worth it given the ease with which one can build a project using visual studio. I am thinking in terms of nightly builds, etc., but then couldn't I use a scheduled event which uses the command-line build option built into VS? Are there superior tools out there?
.net
msbuild
null
null
null
null
open
Is it worth learning to use MSBuild? === I simply wondered whether people thought it was worth learning to use the MSBuild syntax in order to customise the build process for a .net project, or whether it is really not worth it given the ease with which one can build a project using visual studio. I am thinking in terms of nightly builds, etc., but then couldn't I use a scheduled event which uses the command-line build option built into VS? Are there superior tools out there?
0
47,886
09/06/2008 22:28:13
2,757
08/24/2008 21:53:16
353
20
SEO Superstitions: Are <script> tags really bad?
We have an SEO team at my office, and one of their dictums is that having lots of &lt;script&gt; blocks inline with the HTML is apocalypticly bad. As a developer that makes no sense to me at all. Surely the Google search engineers, who are the smartest people on the planet, know how to skip over such blocks? <br /> My gut instinct is that minimizing script blocks is a superstition that comes from the early ages of search engine optimizations, and that in today's world it means nothing. Does anyone have any insight on this?
seo
null
null
null
null
null
open
SEO Superstitions: Are <script> tags really bad? === We have an SEO team at my office, and one of their dictums is that having lots of &lt;script&gt; blocks inline with the HTML is apocalypticly bad. As a developer that makes no sense to me at all. Surely the Google search engineers, who are the smartest people on the planet, know how to skip over such blocks? <br /> My gut instinct is that minimizing script blocks is a superstition that comes from the early ages of search engine optimizations, and that in today's world it means nothing. Does anyone have any insight on this?
0
47,901
09/06/2008 22:45:32
4,946
09/06/2008 22:44:37
1
0
Can UDP data be delivered corrupted?
Is it possible for UDP data to come to you corrupted? I know it is possible for it to be lost.
c++
networking
udp
null
null
null
open
Can UDP data be delivered corrupted? === Is it possible for UDP data to come to you corrupted? I know it is possible for it to be lost.
0
47,903
09/06/2008 22:46:36
4,946
09/06/2008 22:44:37
1
0
UDP vs TCP, how much faster is it?
For general protocol message exchange, with loss tolerant. How much more efficient is UDP over TCP?
c++
networking
udp
null
null
null
open
UDP vs TCP, how much faster is it? === For general protocol message exchange, with loss tolerant. How much more efficient is UDP over TCP?
0
47,910
09/06/2008 22:52:51
4,946
09/06/2008 22:44:37
1
0
Why is Borland C++ better than BC++
Why is Borland C++ better than VC++?
borland
c++
visual-c++
null
null
null
open
Why is Borland C++ better than BC++ === Why is Borland C++ better than VC++?
0
47,915
09/06/2008 22:54:47
4,491
09/04/2008 06:44:23
45
2
Where do you get good icons/images for applications & web apps?
I'm interested in finding good icons/images that can be used in both 'free' and proprietary programs.
image
media
resources
icon
favicon
null
open
Where do you get good icons/images for applications & web apps? === I'm interested in finding good icons/images that can be used in both 'free' and proprietary programs.
0
47,919
09/06/2008 22:58:35
658
08/07/2008 15:07:47
1,656
94
Organization of C files
I'm used to doing all my coding in one C file. However, I'm working on a project large enough that it becomes impractical to do so. I've been #including them together but I've run into cases where I'm #including some files multiple times, etc. I've heard of .h files, but I'm not sure what their function is (or why having 2 files is better than 1). What strategies should I use for organizing my code?
c
file-organization
header
null
null
null
open
Organization of C files === I'm used to doing all my coding in one C file. However, I'm working on a project large enough that it becomes impractical to do so. I've been #including them together but I've run into cases where I'm #including some files multiple times, etc. I've heard of .h files, but I'm not sure what their function is (or why having 2 files is better than 1). What strategies should I use for organizing my code?
0
47,937
09/06/2008 23:10:54
91
08/01/2008 17:55:22
5,804
244
Combining and Caching multiple JavaScript files in ASP.net
Either I had a bad dream recently or I am just too stupid to google, but I remember that someone somewhere wrote that ASP.net has a Function which allows "merging" multiple JavaScript files automatically and only delivering one file to the client, thus reducing the number of HTTP Requests. Server Side, you still kept all the individual .js files, but the Runtime itself then creates one big JavaScript file which is then included in the script-tag instead and can be properly cached etc. In case that this function really exists and is not just a product of my imagination, can someone point me in the right direction please?
asp.net
javascript
null
null
null
null
open
Combining and Caching multiple JavaScript files in ASP.net === Either I had a bad dream recently or I am just too stupid to google, but I remember that someone somewhere wrote that ASP.net has a Function which allows "merging" multiple JavaScript files automatically and only delivering one file to the client, thus reducing the number of HTTP Requests. Server Side, you still kept all the individual .js files, but the Runtime itself then creates one big JavaScript file which is then included in the script-tag instead and can be properly cached etc. In case that this function really exists and is not just a product of my imagination, can someone point me in the right direction please?
0
47,941
09/06/2008 23:18:22
1,175
08/13/2008 10:21:54
1,214
103
Preparing an iPhone Application for Submission to the App Store
I'm trying to upload an application to the iPhone App Store, but I get this error message from iTunes Connect: > The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate. My guess is that it is not properly signed. I have downloaded my App Store distribution certficate, but I can't figure out how to "sign" my application with it. The SDK's documentation about code signing is not very helpful. (FWIW, I can install the app on my iPhone just fine using the development provisioning profile.) Can anybody give me any hints? (BTW, if you feel an overwhelming desire to warn me about the NDA, please just calm down and move along.)
iphone
app-store
null
null
null
null
open
Preparing an iPhone Application for Submission to the App Store === I'm trying to upload an application to the iPhone App Store, but I get this error message from iTunes Connect: > The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate. My guess is that it is not properly signed. I have downloaded my App Store distribution certficate, but I can't figure out how to "sign" my application with it. The SDK's documentation about code signing is not very helpful. (FWIW, I can install the app on my iPhone just fine using the development provisioning profile.) Can anybody give me any hints? (BTW, if you feel an overwhelming desire to warn me about the NDA, please just calm down and move along.)
0
47,953
09/06/2008 23:35:30
4,491
09/04/2008 06:44:23
60
2
What are the advantages of packaging your python library/application as an .egg file?
I've read some about .egg files and I notice them in my lib directory but what are the advantages/disadvantages of using then as a developer?
python
egg
zip
null
null
null
open
What are the advantages of packaging your python library/application as an .egg file? === I've read some about .egg files and I notice them in my lib directory but what are the advantages/disadvantages of using then as a developer?
0
47,960
09/06/2008 23:59:58
1,874
08/19/2008 02:05:31
172
15
What are the best code snippets for C#?
What are the best code snippets for C#? (using visual studio)
c#
visual-studio
code-snippets
null
null
null
open
What are the best code snippets for C#? === What are the best code snippets for C#? (using visual studio)
0
47,972
09/07/2008 00:28:08
3,030
08/26/2008 12:41:34
137
11
What are some advantages of duck-typing vs. static typing?
I'm researching and experimenting more with Groovy and I'm trying to wrap my mind around the pros and cons of implementing things in Groovy that I can't/don't do in Java. Agile/Dynamic programming is still just a concept to me since I've been deeply steeped static and strongly typed languages. Groovy gives me the ability to [duck-type][1], but I can't really see the value. How is duck-typing more productive than static typing? What kind of things can I do in my code practice to help me grasp the benefits of it? I ask this question with Groovy in mind but I understand it isn't necessarily a Groovy question so I welcome answers from every code camp. [1]: http://en.wikipedia.org/wiki/Duck_typing
duck-typing
groovy
null
null
null
null
open
What are some advantages of duck-typing vs. static typing? === I'm researching and experimenting more with Groovy and I'm trying to wrap my mind around the pros and cons of implementing things in Groovy that I can't/don't do in Java. Agile/Dynamic programming is still just a concept to me since I've been deeply steeped static and strongly typed languages. Groovy gives me the ability to [duck-type][1], but I can't really see the value. How is duck-typing more productive than static typing? What kind of things can I do in my code practice to help me grasp the benefits of it? I ask this question with Groovy in mind but I understand it isn't necessarily a Groovy question so I welcome answers from every code camp. [1]: http://en.wikipedia.org/wiki/Duck_typing
0
47,975
09/07/2008 00:30:48
4,949
09/06/2008 23:35:41
1
0
Is it possible to develop DirectX apps in Linux?
More out of interest than anything else, but can you compile a DirectX app under linux? Obviously there's no official SDK, but I was thinking it might be possible with wine. Presumably wine has an implementation of the DirectX interface in order to run games? Is it possible to link against that? Failing that, maybe a mingw cross compiler with the app running under wine. Half answered my own question here, but wondered if anyone had heard of anything like this being done?
c++
linux
directx
mingw
wine
null
open
Is it possible to develop DirectX apps in Linux? === More out of interest than anything else, but can you compile a DirectX app under linux? Obviously there's no official SDK, but I was thinking it might be possible with wine. Presumably wine has an implementation of the DirectX interface in order to run games? Is it possible to link against that? Failing that, maybe a mingw cross compiler with the app running under wine. Half answered my own question here, but wondered if anyone had heard of anything like this being done?
0
47,980
09/07/2008 00:39:39
2,147
08/20/2008 15:14:13
1,118
76
Deciphering C++ template error messages
I'm really beginning to understand what people mean when they say that C++'s error messages are pretty terrible in regards to templates. I've seen horrendously long errors for things as simple as a function not matching its prototype. Are there any tricks to deciphering these errors?
c++
templates
null
null
null
null
open
Deciphering C++ template error messages === I'm really beginning to understand what people mean when they say that C++'s error messages are pretty terrible in regards to templates. I've seen horrendously long errors for things as simple as a function not matching its prototype. Are there any tricks to deciphering these errors?
0
47,981
09/07/2008 00:42:17
445,087
09/02/2008 17:25:48
46
4
How do you set, clear and toggle a single bit in C?
How to set, clear and toggle a bit in C?
c++
c
bit-manipulation
null
null
null
open
How do you set, clear and toggle a single bit in C? === How to set, clear and toggle a bit in C?
0
47,989
09/07/2008 00:50:13
4,789
09/05/2008 15:45:19
38
3
Using icons licensed under GPL or LGPL in a closed source commercial software?
Is there a risk of legal trouble if you include GPL or LGPL licensed icons in a closed source software? Would it force it to become open source just to include the icon? Does it matter if the icon is compiled as a resource? Are the creative common licensed icons safe to use if you follow the attribution rules specified by the license?
licensing
legal
icon
gpl
lgpl
null
open
Using icons licensed under GPL or LGPL in a closed source commercial software? === Is there a risk of legal trouble if you include GPL or LGPL licensed icons in a closed source software? Would it force it to become open source just to include the icon? Does it matter if the icon is compiled as a resource? Are the creative common licensed icons safe to use if you follow the attribution rules specified by the license?
0
48,006
09/07/2008 01:22:09
826
08/09/2008 05:24:54
338
22
Is it worth investing time in learning to use emacs?
Right up front: I do _not_ want to start a religious war. I've used _vi_ for as long as I can remember, and the few times I've tried to pick up _emacs_ I've been so lost so quickly I've given up. Lots of people find emacs very powerful, however. Its programmability is somewhat legendary. I'm primarily doing Solaris+Java development, and I'd like to ask a simple question: will my productivity increase if I invest time in getting my head around emacs? Is the functionality that it offers over _vim_ going to be paid back in productivity increases in a reasonable timeframe? _Repeat: I don't want a "my editor is better than yours". I just want a yes or no answer as to whether it's worth investing the time or not. Will my productivity really increase?_
editor
emacs
vim
text-editor
null
null
open
Is it worth investing time in learning to use emacs? === Right up front: I do _not_ want to start a religious war. I've used _vi_ for as long as I can remember, and the few times I've tried to pick up _emacs_ I've been so lost so quickly I've given up. Lots of people find emacs very powerful, however. Its programmability is somewhat legendary. I'm primarily doing Solaris+Java development, and I'd like to ask a simple question: will my productivity increase if I invest time in getting my head around emacs? Is the functionality that it offers over _vim_ going to be paid back in productivity increases in a reasonable timeframe? _Repeat: I don't want a "my editor is better than yours". I just want a yes or no answer as to whether it's worth investing the time or not. Will my productivity really increase?_
0
48,009
09/07/2008 01:27:50
4,668
09/05/2008 04:08:05
1
1
Implications of Instantiating Objects with Dynamic Variables in PHP
What are the performance, security, or "other" implications of using the following form to declare a new class instance in PHP <?php $class_name = 'SomeClassName'; $object = new $class_name; ?> This is a contrived example, but I've seen this form used in Factories (OOP) to avoid having a big if/switch statement. Problems that come immediately to mind are 1. You loose the ability to pass arguments into a constructor 2. Smells like eval(), with all the security concerns it brings to the table (but not necessarily the performance concerns) What other implications are there, or what search engine terms other than "Rank PHP Hackery" can someone use to research this?
php
oop
php4
php5
performance
null
open
Implications of Instantiating Objects with Dynamic Variables in PHP === What are the performance, security, or "other" implications of using the following form to declare a new class instance in PHP <?php $class_name = 'SomeClassName'; $object = new $class_name; ?> This is a contrived example, but I've seen this form used in Factories (OOP) to avoid having a big if/switch statement. Problems that come immediately to mind are 1. You loose the ability to pass arguments into a constructor 2. Smells like eval(), with all the security concerns it brings to the table (but not necessarily the performance concerns) What other implications are there, or what search engine terms other than "Rank PHP Hackery" can someone use to research this?
0
48,012
09/07/2008 01:34:43
4,835
09/05/2008 20:35:57
6
1
How do the CakePHP and codeigniter frameworks compare to the ASP.NET MVC framework?
As a classic ASP developer about once a year since ASP.NET came out I decide I really gotta buckle down and learn this fancy new ASP.NET. A few days in and messing with code behinds and webforms and all this other stuff I decide the new fancy stuff is whack and go find something else to learn (PHP and Ruby and Python were all fun to play with but I couldn't use it much with my existing ASP stuff). Anyway, one project came up and I was able to use PHP and CakePHP and after getting my head around MVC I finally found something I liked and felt is was worth using over ASP (PHP is cool too but it feels a lot like ASP so maybe that's why I like it so much). But now with Jeff and the SO team raving about ASP.NET MVC, I think it's about time I start messing with ASP.NET again but I keep thinking that PHP is free and blah blah blah . . . is ASP.NET MVC that much better than PHP with tools like CakePHP? I know about compiled vs. not compiled and speed issues but most of that seems like a non-issue when you factor in all the caching and the fact that you can compile your PHP if you want.
php
asp.net-mvc
asp-classic
cakephp
null
null
open
How do the CakePHP and codeigniter frameworks compare to the ASP.NET MVC framework? === As a classic ASP developer about once a year since ASP.NET came out I decide I really gotta buckle down and learn this fancy new ASP.NET. A few days in and messing with code behinds and webforms and all this other stuff I decide the new fancy stuff is whack and go find something else to learn (PHP and Ruby and Python were all fun to play with but I couldn't use it much with my existing ASP stuff). Anyway, one project came up and I was able to use PHP and CakePHP and after getting my head around MVC I finally found something I liked and felt is was worth using over ASP (PHP is cool too but it feels a lot like ASP so maybe that's why I like it so much). But now with Jeff and the SO team raving about ASP.NET MVC, I think it's about time I start messing with ASP.NET again but I keep thinking that PHP is free and blah blah blah . . . is ASP.NET MVC that much better than PHP with tools like CakePHP? I know about compiled vs. not compiled and speed issues but most of that seems like a non-issue when you factor in all the caching and the fact that you can compile your PHP if you want.
0
48,017
09/07/2008 01:40:27
445,087
09/02/2008 17:25:48
83
4
What is a jump table?
Can someone explain the mechanics of a jump table and why is would be needed in embedded systems?
c++
c
memory
null
null
null
open
What is a jump table? === Can someone explain the mechanics of a jump table and why is would be needed in embedded systems?
0
48,026
09/07/2008 01:50:15
4,337
09/02/2008 22:43:39
46
5
Good Book on Scaling Asp.Net applications
Can somebody suggest a good solid book on scaling Asp.Net applications? One that could potentially scale to millions of users. Some of the books listed here are pretty good (http://highscalability.com/book-store). They cover a range of techniques which can be used independently of the technology used. What I was looking for is something specific to Microsoft world, from someone who went through all that pain (like [myspace][1]). This might cover some techniques on some of the stuffs like using distributed caching ([velocity][2]), doing away with established database practices like normalization etc. I went through some of the MSDN stuffs, blogs but I guess nothing beats a good book huh.. Or, maybe I should wait for SSDS. [1]: http://highscalability.com/myspace-architecture [2]: http://www.25hoursaday.com/weblog/2008/06/06/VelocityADistributedInMemoryCacheFromMicrosoft.aspx
asp.net
scalability
null
null
null
null
open
Good Book on Scaling Asp.Net applications === Can somebody suggest a good solid book on scaling Asp.Net applications? One that could potentially scale to millions of users. Some of the books listed here are pretty good (http://highscalability.com/book-store). They cover a range of techniques which can be used independently of the technology used. What I was looking for is something specific to Microsoft world, from someone who went through all that pain (like [myspace][1]). This might cover some techniques on some of the stuffs like using distributed caching ([velocity][2]), doing away with established database practices like normalization etc. I went through some of the MSDN stuffs, blogs but I guess nothing beats a good book huh.. Or, maybe I should wait for SSDS. [1]: http://highscalability.com/myspace-architecture [2]: http://www.25hoursaday.com/weblog/2008/06/06/VelocityADistributedInMemoryCacheFromMicrosoft.aspx
0
48,041
09/07/2008 02:14:07
4,962
09/07/2008 02:08:46
1
0
Hbase / Hadoop Query Help
I'm working on a project with a friend that will utilize Hbase to store it's data. Are there any good query examples? I seem to be writing a ton of Java code to iterate through lists of RowResult's when, in SQL land, I could write a simple query. Am I missing something? Or is Hbase missing something?
hadoop
hbase
null
null
null
null
open
Hbase / Hadoop Query Help === I'm working on a project with a friend that will utilize Hbase to store it's data. Are there any good query examples? I seem to be writing a ton of Java code to iterate through lists of RowResult's when, in SQL land, I could write a simple query. Am I missing something? Or is Hbase missing something?
0
48,053
09/07/2008 02:31:29
445,087
09/02/2008 17:25:48
105
4
Is there an alternative to using % (modulus) in C/C++?
I read somewhere once that the modulus operator is inefficient on small embedded devices such as 8 bit micros without integer division operator. Perhaps someone can confirm this but I thought the difference is 5-10 time slower than with an integer division operation.<p> Is there another way to do this other than keeping a counter variable and manually overflowing to 0 at the mod point?<p> <pre><code> const int FIZZ = 6; for(int x = 0; x < MAX_CONT; x++) { if(!(x % FIZZ)) print("Fizz\n"); // slow on some systems } </code></pre> vs: The way I am currently doing it: <pre><code> const int FIZZ = 6; int fizz_count = 1; for(int x = 1; x < MAX_CONT; x++) { if(fizz_count >= FIZZ) { print("Fizz\n"); fizz_count = 0; } } </code></pre>
c
c++
modulo
null
null
null
open
Is there an alternative to using % (modulus) in C/C++? === I read somewhere once that the modulus operator is inefficient on small embedded devices such as 8 bit micros without integer division operator. Perhaps someone can confirm this but I thought the difference is 5-10 time slower than with an integer division operation.<p> Is there another way to do this other than keeping a counter variable and manually overflowing to 0 at the mod point?<p> <pre><code> const int FIZZ = 6; for(int x = 0; x < MAX_CONT; x++) { if(!(x % FIZZ)) print("Fizz\n"); // slow on some systems } </code></pre> vs: The way I am currently doing it: <pre><code> const int FIZZ = 6; int fizz_count = 1; for(int x = 1; x < MAX_CONT; x++) { if(fizz_count >= FIZZ) { print("Fizz\n"); fizz_count = 0; } } </code></pre>
0
48,070
09/07/2008 02:47:32
1,965
08/19/2008 15:51:08
3,202
194
Moving ViewState out of the page?
We are trying to lighten our page load as much as possible. Since ViewState can sometimes swell up to 100k of the page, I'd love to completely eliminate it. I'd love to hear some techniques other people have used to move ViewState to a custom provider. That said, a few caveats: * We serve on average 2 Million unique visitors per hour. * Because of this, Database reads have been a serious issue in performance, so I don't want to store ViewState in the database. * We also are behind a load balancer, so any solution has to work with the user bouncing from machine to machine per postback. Ideas?
asp.net
viewstate
scaling
null
null
null
open
Moving ViewState out of the page? === We are trying to lighten our page load as much as possible. Since ViewState can sometimes swell up to 100k of the page, I'd love to completely eliminate it. I'd love to hear some techniques other people have used to move ViewState to a custom provider. That said, a few caveats: * We serve on average 2 Million unique visitors per hour. * Because of this, Database reads have been a serious issue in performance, so I don't want to store ViewState in the database. * We also are behind a load balancer, so any solution has to work with the user bouncing from machine to machine per postback. Ideas?
0
48,076
09/07/2008 02:52:47
4,906
09/06/2008 14:21:25
50
1
What's a good IDE to edit WScript (.vbs files) that provides intellisene?
I tried editing it in VB.net 2005 and it's giving me syntax highlighting, but not intellisense.
ide
wscript
.vbs
null
null
09/02/2011 15:06:18
not constructive
What's a good IDE to edit WScript (.vbs files) that provides intellisene? === I tried editing it in VB.net 2005 and it's giving me syntax highlighting, but not intellisense.
4
48,083
09/07/2008 03:07:42
4,964
09/07/2008 03:07:41
1
0
Is there a .NET Control Similar to the Access 2007 Split Form?
Is there a .NET Control Similar to the Access 2007 Split Form? Or has anyone built such a control? I upgraded a small personal Name and Address DB to Access 2007 and noticed the Form had a property called “Default View” which can be set to “Split Form”. “Split Form” mode has a GridView and a Form together in one control. When a record is clicked in the GridView, it shows up in the form and it can be edited in either the GridView and/or the Form by setting some properties. Pretty slick.
.net
ms-access
null
null
null
null
open
Is there a .NET Control Similar to the Access 2007 Split Form? === Is there a .NET Control Similar to the Access 2007 Split Form? Or has anyone built such a control? I upgraded a small personal Name and Address DB to Access 2007 and noticed the Form had a property called “Default View” which can be set to “Split Form”. “Split Form” mode has a GridView and a Form together in one control. When a record is clicked in the GridView, it shows up in the form and it can be edited in either the GridView and/or the Form by setting some properties. Pretty slick.
0
48,087
09/07/2008 03:12:28
4,541
09/04/2008 17:37:04
47
1
Select a random N elements from List<T> in C#
I need a quick algorithm to select a random 5 elements from a generic list. For example, I'd like to get a random 5 elements from a List<string>.
c#
generics
null
null
null
null
open
Select a random N elements from List<T> in C# === I need a quick algorithm to select a random 5 elements from a generic list. For example, I'd like to get a random 5 elements from a List<string>.
0
48,088
09/07/2008 03:15:58
797
08/09/2008 02:14:04
1,671
66
Returning from a finally block in Java
I was surprised recently to find that it's possible to have a return statement in a finally block in Java. It seems like lots of people think it's a bad thing to do as described in '[Don't return in a finally clause][1]'. Scratching a little deaper, I also found '[Java's return doesn't always][2]' which shows some pretty horrible examples of other types of flow control in finally blocks. So, my question is, can anyone give me an example where a return statement (or other flow control) in a finally block produces better / more readable code? [1]: http://weblogs.java.net/blog/staufferjames/archive/2007/06/_dont_return_in.html [2]: http://www.cs.arizona.edu/projects/sumatra/hallofshame/
java
null
null
null
null
null
open
Returning from a finally block in Java === I was surprised recently to find that it's possible to have a return statement in a finally block in Java. It seems like lots of people think it's a bad thing to do as described in '[Don't return in a finally clause][1]'. Scratching a little deaper, I also found '[Java's return doesn't always][2]' which shows some pretty horrible examples of other types of flow control in finally blocks. So, my question is, can anyone give me an example where a return statement (or other flow control) in a finally block produces better / more readable code? [1]: http://weblogs.java.net/blog/staufferjames/archive/2007/06/_dont_return_in.html [2]: http://www.cs.arizona.edu/projects/sumatra/hallofshame/
0
48,094
09/07/2008 03:19:36
2,147
08/20/2008 15:14:13
1,170
77
C++ deleting a pointer to a pointer
So I have a pointer to an array of pointers. If I delete it like this: delete [] PointerToPointers; Will that delete all the pointed to pointers as well? If not, do I have to loop over all of the pointers and delete them as well, or is there an easier way to do it? My google-fu doesn't seem to give me any good answers to this question. (And yeah, I know I need to use a vector. This is one of those "catch up on C++" type assignments in school.)
c++
pointers
null
null
null
null
open
C++ deleting a pointer to a pointer === So I have a pointer to an array of pointers. If I delete it like this: delete [] PointerToPointers; Will that delete all the pointed to pointers as well? If not, do I have to loop over all of the pointers and delete them as well, or is there an easier way to do it? My google-fu doesn't seem to give me any good answers to this question. (And yeah, I know I need to use a vector. This is one of those "catch up on C++" type assignments in school.)
0
48,110
09/07/2008 03:38:14
797
08/09/2008 02:14:04
1,691
67
Free text search integrated with code coverage
Is there any tool which will allow me to perform a free text search over a system's code, but only over the code which was actually executed during a particular invocation? To give a bit of background, when learning my way around a new system, I frequently find myself wanting to discover where some particular value came from, but searching the entire code base turns up far more matches than I can reasonably assess individually. For what it's worth, I've wanted this in Perl and Java at one time or another, but I'd love to know if any languages have a system supporting this feature.
language-agnostic
search
debugging
code-coverage
null
null
open
Free text search integrated with code coverage === Is there any tool which will allow me to perform a free text search over a system's code, but only over the code which was actually executed during a particular invocation? To give a bit of background, when learning my way around a new system, I frequently find myself wanting to discover where some particular value came from, but searching the entire code base turns up far more matches than I can reasonably assess individually. For what it's worth, I've wanted this in Perl and Java at one time or another, but I'd love to know if any languages have a system supporting this feature.
0
48,115
09/07/2008 03:50:22
4,659
09/05/2008 01:58:12
81
3
DHCP overwrites Cisco VPN resolv.conf on Linux
I'm using an Ubuntu 8.04 (x86_64) machine to connect to my employer's Cisco VPN. (The client didn't compile out of the box, but I found <a href="http://projects.tuxx-home.at/?id=cisco_vpn_client">patches to update the client to compile on kernels released in the last two years</a>.) This all works great, until my DHCP client decides to renew its lease and updates /etc/resolv.conf, replacing the VPN-specific name servers with my general network servers. Is there a good way to prevent my DHCP client from updating /etc/resolv.conf while my VPN is active?
linux
vpn
cisco
null
null
null
open
DHCP overwrites Cisco VPN resolv.conf on Linux === I'm using an Ubuntu 8.04 (x86_64) machine to connect to my employer's Cisco VPN. (The client didn't compile out of the box, but I found <a href="http://projects.tuxx-home.at/?id=cisco_vpn_client">patches to update the client to compile on kernels released in the last two years</a>.) This all works great, until my DHCP client decides to renew its lease and updates /etc/resolv.conf, replacing the VPN-specific name servers with my general network servers. Is there a good way to prevent my DHCP client from updating /etc/resolv.conf while my VPN is active?
0
48,123
09/07/2008 04:00:41
802
08/09/2008 02:50:52
41
3
Glade or no glade: What is the best way to use PyGtk?
I've been learning python for a while now with some success. I even managed to create one or two (simple) programs using PyGtk + Glade. The thing is: I am not sure if the best way to use GTK with python is by building the interfaces using Glade. I was wondering if the more experienced ones among us (remember, I'm just a beginner) could point out the benefits and caveats of using Glade as opposed to creating everything in the code itself (assuming that learning the correct gtk bindings wouldn't exactly be a problem).
python
gtk
pygtk
glade
null
null
open
Glade or no glade: What is the best way to use PyGtk? === I've been learning python for a while now with some success. I even managed to create one or two (simple) programs using PyGtk + Glade. The thing is: I am not sure if the best way to use GTK with python is by building the interfaces using Glade. I was wondering if the more experienced ones among us (remember, I'm just a beginner) could point out the benefits and caveats of using Glade as opposed to creating everything in the code itself (assuming that learning the correct gtk bindings wouldn't exactly be a problem).
0
48,124
09/07/2008 04:02:29
115
08/02/2008 05:44:40
954
107
Generating (sudo)random alpha-numeric strings
How can I generate a (sudo)random alpha-numeric string, something like: 'd79jd8c' in PHP?
php
random
null
null
null
null
open
Generating (sudo)random alpha-numeric strings === How can I generate a (sudo)random alpha-numeric string, something like: 'd79jd8c' in PHP?
0
48,126
09/07/2008 04:06:34
1,638
08/17/2008 17:58:57
457
46
PHP + MySql + Stored Procedures, how do I get access an "out" value?
Documentation is severely lacking on anything to do with stored procedures in mysql with PHP. I currently have a stored procedure that I call via PHP, how can I get the value of an out parameter?
php
mysql
stored-procedures
mysqli
null
null
open
PHP + MySql + Stored Procedures, how do I get access an "out" value? === Documentation is severely lacking on anything to do with stored procedures in mysql with PHP. I currently have a stored procedure that I call via PHP, how can I get the value of an out parameter?
0
48,132
09/07/2008 04:14:14
1,513
08/16/2008 03:34:56
31
1
Monitoring CPU Core Usage on Terminal Servers
I have windows 2003 terminal servers, multi-core. I'm looking for a way to monitor individual CPU core usage on these servers. It is possible for an end-user to have a run-away process (e.g. Internet Explorer or Outlook). The core for that process may spike to near 100% leaving the other cores 'normal'. Thus, the overall CPU usage on the server is just the total of all the cores or if 7 of the cores on a 8 core server are idle and the 8th is running at 100% then 1/8 = 12.5% usage. What utility can I use to monitor multiple servers ? If the CPU usage for a core is "high" what would I use to determine the offending process and then how could I automatically kill that process if it was on the 'approved kill process' list? A product from http://www.packettrap.com/ called PT360 would be perfect except they use SMNP to get data and SMNP appears to only give total CPU usage, it's not broken out by an individual core. Take a look at their Dashboard option with the CPU gauge 'gadget'. That's exactly what I need if only it worked at the core level. Any ideas?
windows
monitoring
monitor
terminalservices
null
null
open
Monitoring CPU Core Usage on Terminal Servers === I have windows 2003 terminal servers, multi-core. I'm looking for a way to monitor individual CPU core usage on these servers. It is possible for an end-user to have a run-away process (e.g. Internet Explorer or Outlook). The core for that process may spike to near 100% leaving the other cores 'normal'. Thus, the overall CPU usage on the server is just the total of all the cores or if 7 of the cores on a 8 core server are idle and the 8th is running at 100% then 1/8 = 12.5% usage. What utility can I use to monitor multiple servers ? If the CPU usage for a core is "high" what would I use to determine the offending process and then how could I automatically kill that process if it was on the 'approved kill process' list? A product from http://www.packettrap.com/ called PT360 would be perfect except they use SMNP to get data and SMNP appears to only give total CPU usage, it's not broken out by an individual core. Take a look at their Dashboard option with the CPU gauge 'gadget'. That's exactly what I need if only it worked at the core level. Any ideas?
0
48,135
09/07/2008 04:19:13
4,960
09/07/2008 02:07:20
1
2
How can I allow incoming connections to a server inside of VirtualBox?
I have a NAT configured to run when loading up my favorite Linux distribution in VitualBox. This allows outgoing connections to work successfully. How do I allow incoming connections to this box, like, say, Web traffic? The IP address is 10.0.2.15. A ping request from my main box results in a Timeout.
virtualbox
null
null
null
null
null
open
How can I allow incoming connections to a server inside of VirtualBox? === I have a NAT configured to run when loading up my favorite Linux distribution in VitualBox. This allows outgoing connections to work successfully. How do I allow incoming connections to this box, like, say, Web traffic? The IP address is 10.0.2.15. A ping request from my main box results in a Timeout.
0
48,144
09/07/2008 04:36:27
1,891
08/19/2008 05:37:52
178
5
What are advantages of bytecode over native code?
It seems like anything you can do with bytecode you can do just as easily and much faster in native code. In theory, you could even retain platform and language independence by distributing programs and libraries in bytecode then compiling to native code at installation. So in general, when would you want to execute bytecode instead of native?
bytecode
.net
java
null
null
null
open
What are advantages of bytecode over native code? === It seems like anything you can do with bytecode you can do just as easily and much faster in native code. In theory, you could even retain platform and language independence by distributing programs and libraries in bytecode then compiling to native code at installation. So in general, when would you want to execute bytecode instead of native?
0
48,148
09/07/2008 04:39:17
4,337
09/02/2008 22:43:39
78
6
Tool for analyzing .Net app memory dumps
Can somebody suggest a good **free** tool for analyzing .Net memory dumps other than Adplus/windbg/sos ?
.net
null
null
null
null
null
open
Tool for analyzing .Net app memory dumps === Can somebody suggest a good **free** tool for analyzing .Net memory dumps other than Adplus/windbg/sos ?
0
48,157
09/07/2008 04:53:39
4,883
09/06/2008 10:24:59
129
0
Configure static routes on Windows
There is a "netsh" and a "route" command on Windows. From their help text it looks like both can be used to configure static routes. When should you use one and not the other? Is IPv6 a distinguishing factor here?
windows
networking
null
null
null
null
open
Configure static routes on Windows === There is a "netsh" and a "route" command on Windows. From their help text it looks like both can be used to configure static routes. When should you use one and not the other? Is IPv6 a distinguishing factor here?
0
48,176
09/07/2008 05:21:42
4,883
09/06/2008 10:24:59
129
0
Embedding a remote Python shell in an application
You can embed the [IPython](http://ipython.scipy.org/) shell inside of your application so that it launches the shell in the foreground. Is there a way to embed a telnet server in a python app so that you can telnet to a certain port and launch a remote IPython shell? Any tips for redirecting the input/output streams for IPython or how to hook it up to a telnet server library or recommendations for other libraries that could be used to implement this are much appreciated.
python
networking
null
null
null
null
open
Embedding a remote Python shell in an application === You can embed the [IPython](http://ipython.scipy.org/) shell inside of your application so that it launches the shell in the foreground. Is there a way to embed a telnet server in a python app so that you can telnet to a certain port and launch a remote IPython shell? Any tips for redirecting the input/output streams for IPython or how to hook it up to a telnet server library or recommendations for other libraries that could be used to implement this are much appreciated.
0
48,179
09/07/2008 05:35:36
4,213
09/02/2008 11:02:12
566
38
Video Thumbnails in Java
I want to generate a thumbnail preview of videos in Java. I'm mostly JMF and video manipulation alienated. - Is there an easy way to do it? - What about codecs? Will I have to deal with it? - Any video type is suported? (including Quicktime)
java
video
jmf
null
null
null
open
Video Thumbnails in Java === I want to generate a thumbnail preview of videos in Java. I'm mostly JMF and video manipulation alienated. - Is there an easy way to do it? - What about codecs? Will I have to deal with it? - Any video type is suported? (including Quicktime)
0
48,198
09/07/2008 06:26:12
4,883
09/06/2008 10:24:59
129
0
How can you find out which process is listening on a port on Windows?
How can you find out which process is listening on a port on Windows?
windows
networking
null
null
null
null
open
How can you find out which process is listening on a port on Windows? === How can you find out which process is listening on a port on Windows?
0
48,203
09/07/2008 06:32:58
4,857
09/06/2008 03:07:01
6
0
Are there any Java Developer specific Linux Distros ?
Enough said ...
java
linux
distro
null
null
null
open
Are there any Java Developer specific Linux Distros ? === Enough said ...
0
48,211
09/07/2008 06:54:54
4,883
09/06/2008 10:24:59
154
0
Free python decompiler that is not an online service?
Is there a library or app that can decompile Python 2.4+ bytecode to obtain the source code? A search revealed: * <http://depython.net> - an online service that you need to upload a pyc or pyo file to * the [dis module](http://docs.python.org/lib/module-dis.html) - allows you to disassemble, but not decompile bytecode * [decompile.py](http://users.cs.cf.ac.uk/J.P.Giddy/python/decompiler/decompiler.html) - works only for 1.5.2 or 2.0 * decompyle - an decompiling online service that you need to pay for and upload your pyc to
python
decompiling
null
null
null
null
open
Free python decompiler that is not an online service? === Is there a library or app that can decompile Python 2.4+ bytecode to obtain the source code? A search revealed: * <http://depython.net> - an online service that you need to upload a pyc or pyo file to * the [dis module](http://docs.python.org/lib/module-dis.html) - allows you to disassemble, but not decompile bytecode * [decompile.py](http://users.cs.cf.ac.uk/J.P.Giddy/python/decompiler/decompiler.html) - works only for 1.5.2 or 2.0 * decompyle - an decompiling online service that you need to pay for and upload your pyc to
0
48,215
09/07/2008 07:11:51
1,293
08/14/2008 12:38:08
729
65
JQuery & Objects, trying to make a ligthwight widget.
Trying to make a make generic select "control" that I can dynamically add elements to but I am having trouble getting functions to work right. This is what I started with. $select = $("<select></select>"); $select.addOption = function(value,text){ $(this).append($("<option></option>").val(value).text(text)); }; This workd fine alone but anytime $select is .clone(true)'ed the addOption function is lost. This is my object approach but still the function does not work. function $selectX() { return $("<select></select>"); } $selectX.prototype.addOption() = function(value,text){ $(this).append($("<option></option>").val(value).text(text)); }; Hack solution is to add the function manually after creation. $nameSelect= new $selectX; $nameSelect.addOption = function(value,text){ $(this).append($("<option></option>").val(value).text(text)); }; Am I barking up the wrong tree? Thanks for the help
javascript
jquery
null
null
null
null
open
JQuery & Objects, trying to make a ligthwight widget. === Trying to make a make generic select "control" that I can dynamically add elements to but I am having trouble getting functions to work right. This is what I started with. $select = $("<select></select>"); $select.addOption = function(value,text){ $(this).append($("<option></option>").val(value).text(text)); }; This workd fine alone but anytime $select is .clone(true)'ed the addOption function is lost. This is my object approach but still the function does not work. function $selectX() { return $("<select></select>"); } $selectX.prototype.addOption() = function(value,text){ $(this).append($("<option></option>").val(value).text(text)); }; Hack solution is to add the function manually after creation. $nameSelect= new $selectX; $nameSelect.addOption = function(value,text){ $(this).append($("<option></option>").val(value).text(text)); }; Am I barking up the wrong tree? Thanks for the help
0
48,224
09/07/2008 07:40:20
1,583
08/16/2008 20:54:12
302
11
How to use webclient in a secure site?
I need to automate a process involving a website that is using a login form. I need to capture some data in the pages following the login page. I know how to screen-scrape normal pages, but not those behind a secure site. 1. Can this be done with the WebClient class? - How would I automatically login? - How would I keep logged in for the other pages?
screen-scraping
null
null
null
null
null
open
How to use webclient in a secure site? === I need to automate a process involving a website that is using a login form. I need to capture some data in the pages following the login page. I know how to screen-scrape normal pages, but not those behind a secure site. 1. Can this be done with the WebClient class? - How would I automatically login? - How would I keep logged in for the other pages?
0
48,225
09/07/2008 07:49:52
432
08/05/2008 17:18:46
971
40
Play button in browser
I want to put songs on a web page and have a little play button, like you can see on Last.fm or Pandora. There can be multiple songs listed on the site, and if you start playing a different song with one already playing, it will pause the first track and begin playing the one you just clicked on. I think they use Flash for this, and I could probably implement it in a few hours, but is there already code I could use for this? Maybe just a flash swf file that you stick hidden on a web page with a basic Javascript API that I can use to stream mp3 files?
flash
browser
mp3
streaming
null
null
open
Play button in browser === I want to put songs on a web page and have a little play button, like you can see on Last.fm or Pandora. There can be multiple songs listed on the site, and if you start playing a different song with one already playing, it will pause the first track and begin playing the one you just clicked on. I think they use Flash for this, and I could probably implement it in a few hours, but is there already code I could use for this? Maybe just a flash swf file that you stick hidden on a web page with a basic Javascript API that I can use to stream mp3 files?
0
48,235
09/07/2008 08:03:45
4,857
09/06/2008 03:07:01
16
0
How can I help to port Google Chrome to Linux ?
I really enjoy Chrome, and the sheer exercise of helping a port would boost my knowledge-base. Where do I start?
porting
google-chrome
linux
null
null
null
open
How can I help to port Google Chrome to Linux ? === I really enjoy Chrome, and the sheer exercise of helping a port would boost my knowledge-base. Where do I start?
0
48,239
09/07/2008 08:09:38
1,090
08/12/2008 11:16:17
40
4
Getting the ID of the element that fired an event using JQuery
Is there any way to get the ID of the element that fires an event? I'm thinking something like: <html> <head> <script type="text/javascript" src="starterkit/jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("a").click( function(){ var test = caller.id; alert(test.val()); } ); }); </script> </head> <body> <form class="item" id="aaa"><input class="title"></input></form> <form class="item" id="bbb"><input class="title"></input></form> </body> </html> Except ofcourse that the var test should contain the id "aaa", if the event is fired from the first form, and bbb, if the event is fired from the second form. Can anyone help with this? /Jonas
javascript
jquery
null
null
null
null
open
Getting the ID of the element that fired an event using JQuery === Is there any way to get the ID of the element that fires an event? I'm thinking something like: <html> <head> <script type="text/javascript" src="starterkit/jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("a").click( function(){ var test = caller.id; alert(test.val()); } ); }); </script> </head> <body> <form class="item" id="aaa"><input class="title"></input></form> <form class="item" id="bbb"><input class="title"></input></form> </body> </html> Except ofcourse that the var test should contain the id "aaa", if the event is fired from the first form, and bbb, if the event is fired from the second form. Can anyone help with this? /Jonas
0
48,240
09/07/2008 08:10:00
124
08/02/2008 08:24:47
169
3
How can I upsert a bunch of ActiveRecord objects and relationships in Rails?
I am working with an API that provides bus arrival data. For every request, I get back (among other things) a list of which routes serve the stop in question. For example, if the list includes result for bus route #1, 2, and 5, then I know that those serve this stop. I have a many-to-many relationship set up between Route and Stop, and I want to dynamically check and update these associations on every request. There is no "master list" of which routes serve which stops, so this seems like the best way to get this data. I believe that the way I'm doing it now is very inefficient: # routes is an array of [number, destination] that I build while iterating over the data routes.uniq.each do |route| number = route[0] destination = route[1] r = Route.find_by_number_and_destination(number, destination) if !r r = Route.new :number => number, :destination => destination r.save end # I have to check if it already exists because I can't find a way # to create a uniqueness constraint on the join table with 2 foreign keys r.stops << stop unless r.stops.include? stop end Basically, I have to do 2 things for every route I find: 1) Create it if it doesn't already exist, 2) Add a relationship to the current stop if it doesn't already exist. Is there a better way to do this, for example by getting a bunch of the data in memory and doing some of the processing on the app server side, in order to avoid the multitude of database calls I'm currently doing?
ruby-on-rails
activerecord
null
null
null
null
open
How can I upsert a bunch of ActiveRecord objects and relationships in Rails? === I am working with an API that provides bus arrival data. For every request, I get back (among other things) a list of which routes serve the stop in question. For example, if the list includes result for bus route #1, 2, and 5, then I know that those serve this stop. I have a many-to-many relationship set up between Route and Stop, and I want to dynamically check and update these associations on every request. There is no "master list" of which routes serve which stops, so this seems like the best way to get this data. I believe that the way I'm doing it now is very inefficient: # routes is an array of [number, destination] that I build while iterating over the data routes.uniq.each do |route| number = route[0] destination = route[1] r = Route.find_by_number_and_destination(number, destination) if !r r = Route.new :number => number, :destination => destination r.save end # I have to check if it already exists because I can't find a way # to create a uniqueness constraint on the join table with 2 foreign keys r.stops << stop unless r.stops.include? stop end Basically, I have to do 2 things for every route I find: 1) Create it if it doesn't already exist, 2) Add a relationship to the current stop if it doesn't already exist. Is there a better way to do this, for example by getting a bunch of the data in memory and doing some of the processing on the app server side, in order to avoid the multitude of database calls I'm currently doing?
0
48,249
09/07/2008 08:23:19
4,857
09/06/2008 03:07:01
16
0
Is there a simple way to embed a browser in a Java Applications Window, which is not Platform Specific ?
I have been looking for some time but have still to find this!
java
os-agnostic
browser
null
null
null
open
Is there a simple way to embed a browser in a Java Applications Window, which is not Platform Specific ? === I have been looking for some time but have still to find this!
0
48,250
09/07/2008 08:23:51
4,988
09/07/2008 08:23:51
1
0
Free JSP plugin for eclipse?
I was looking out for a free plugin for developing/debugging JSP pages in eclipse. Any suggestions?
eclipse
jsp
null
null
null
null
open
Free JSP plugin for eclipse? === I was looking out for a free plugin for developing/debugging JSP pages in eclipse. Any suggestions?
0
48,253
09/07/2008 08:32:11
4,985
09/07/2008 08:11:34
1
0
Compile a PHP script in Linux
I know php scripts don't actually compile until they are run. However say I want to create a small simple program and compile it to a binary without requiring the php binary. How could I do this? I'v seen a few IDE's out there that would do this, but either they are all for windows or the linux versions don't actually build properly. What I would like is something like py2exe that does it in the script itself.
php
linux
null
null
null
null
open
Compile a PHP script in Linux === I know php scripts don't actually compile until they are run. However say I want to create a small simple program and compile it to a binary without requiring the php binary. How could I do this? I'v seen a few IDE's out there that would do this, but either they are all for windows or the linux versions don't actually build properly. What I would like is something like py2exe that does it in the script itself.
0
48,257
09/07/2008 08:36:14
4,489
09/04/2008 06:00:46
33
5
SharePoint Infrastructure Upgrade - whoops
I applied the MOSS infrastructure upgrade w/o applying the WSS one before it -- uh, help!
sharepoint
null
null
null
null
null
open
SharePoint Infrastructure Upgrade - whoops === I applied the MOSS infrastructure upgrade w/o applying the WSS one before it -- uh, help!
0
48,271
09/07/2008 09:28:23
4,996
09/07/2008 09:28:22
1
0
Setting DataGridView.DefaultCellStyle.NullValue to null at designtime raises error at adding rows runtime.
In Visual Studio 2008 - add a new DataGridView to a form - Edit Columns - Add a a new DataGridViewImageColumn - Open the CellStyle Builder of this column (DefaultCellStyle property) - Change the NullValue from System.Drawing.Bitmap to null - Try to add a new Row to the DataGridView at runtime (dataGridView1.Rows.Add();) - You get this error: System.FormatException: Formatted value of the cell has a wrong type. If you change back the NullValue to System.Drawing.Bitmap (as it was) you still get the same error at adding a row. If you set the NullValue at runtime instead of designtime you don't get anny error. (dataGridView1.Columns[0].DefaultCellStyle.NullValue = null;) Could you tell me why is that?
c#
datagridview
null
null
null
null
open
Setting DataGridView.DefaultCellStyle.NullValue to null at designtime raises error at adding rows runtime. === In Visual Studio 2008 - add a new DataGridView to a form - Edit Columns - Add a a new DataGridViewImageColumn - Open the CellStyle Builder of this column (DefaultCellStyle property) - Change the NullValue from System.Drawing.Bitmap to null - Try to add a new Row to the DataGridView at runtime (dataGridView1.Rows.Add();) - You get this error: System.FormatException: Formatted value of the cell has a wrong type. If you change back the NullValue to System.Drawing.Bitmap (as it was) you still get the same error at adding a row. If you set the NullValue at runtime instead of designtime you don't get anny error. (dataGridView1.Columns[0].DefaultCellStyle.NullValue = null;) Could you tell me why is that?
0
48,278
09/07/2008 09:51:09
4,582
09/04/2008 18:37:19
1
1
How to print css applied background images with the winforms webbrowser control
I am using the webbrowser control in winforms and discovered now that background images which I apply with css are not included in the printouts. Is there a way to make the webbrowser print the background of the displayed document too?
c#
winforms
printing
webbrowser
null
null
open
How to print css applied background images with the winforms webbrowser control === I am using the webbrowser control in winforms and discovered now that background images which I apply with css are not included in the printouts. Is there a way to make the webbrowser print the background of the displayed document too?
0
48,288
09/07/2008 10:14:23
4,200
09/02/2008 09:57:33
126
6
Unexpected behaviour of Process.MainWindowHandle
I've been trying to understand [Process.MainWindowHandle][1]. According to MSDN; "The main window is the window that is created when the process is started. After initialization, other windows may be opened, including the Modal and TopLevel windows, but <em>the first window associated with the process remains the main window</em>." (Emphasis added) But while debugging I noticed that MainWindowHandle seemed to change value... which I wasn't expecting, especially after consulting the documentation above. To confirm the behaviour I created a standalone WinForms app with a timer to check the MainWindowHandle of the "DEVENV" (Visual Studio) process every 100ms. Here's the interesting part of this test app... IntPtr oldHWnd = IntPtr.Zero; void GetMainwindowHandle() { Process[] processes = Process.GetProcessesByName("DEVENV"); if (processes.Length!=1) return; IntPtr newHWnd = processes[0].MainWindowHandle; if (newHWnd != oldHWnd) { oldHWnd = newHWnd; textBox1.AppendText(processes[0].MainWindowHandle.ToString("X")+"\r\n"); } } private void timer1Tick(object sender, EventArgs e) { GetMainwindowHandle(); } You can see the value of MainWindowHandle changing when you (for example) click on a drop-down menu inside VS. ![MainWindowHandleMystery][2] Perhaps I've misunderstood the documentation. Can anyone shed light? [1]: http://msdn.microsoft.com/en-gb/library/system.diagnostics.process.mainwindowhandle.aspx [2]: http://i37.tinypic.com/11ky1yb.jpg
c#
.net
msdn
null
null
null
open
Unexpected behaviour of Process.MainWindowHandle === I've been trying to understand [Process.MainWindowHandle][1]. According to MSDN; "The main window is the window that is created when the process is started. After initialization, other windows may be opened, including the Modal and TopLevel windows, but <em>the first window associated with the process remains the main window</em>." (Emphasis added) But while debugging I noticed that MainWindowHandle seemed to change value... which I wasn't expecting, especially after consulting the documentation above. To confirm the behaviour I created a standalone WinForms app with a timer to check the MainWindowHandle of the "DEVENV" (Visual Studio) process every 100ms. Here's the interesting part of this test app... IntPtr oldHWnd = IntPtr.Zero; void GetMainwindowHandle() { Process[] processes = Process.GetProcessesByName("DEVENV"); if (processes.Length!=1) return; IntPtr newHWnd = processes[0].MainWindowHandle; if (newHWnd != oldHWnd) { oldHWnd = newHWnd; textBox1.AppendText(processes[0].MainWindowHandle.ToString("X")+"\r\n"); } } private void timer1Tick(object sender, EventArgs e) { GetMainwindowHandle(); } You can see the value of MainWindowHandle changing when you (for example) click on a drop-down menu inside VS. ![MainWindowHandleMystery][2] Perhaps I've misunderstood the documentation. Can anyone shed light? [1]: http://msdn.microsoft.com/en-gb/library/system.diagnostics.process.mainwindowhandle.aspx [2]: http://i37.tinypic.com/11ky1yb.jpg
0
48,293
09/07/2008 10:25:25
342
08/04/2008 19:59:52
654
75
Running a regular background event in Java web app
In podcast #15, Jeff mentioned he twittered about how to run a regular event in the background as if it was a normal function - unfortunately I can't seem to find that through twitter. Now I need to do a similar thing and was going to throw the question to the masses. My current plan is when the first user (probably me) enters the site it starts a background thread that waits until the alloted time (hourly on the hour) and then kicks off the event blocking the others (I am a Windows programmer by trade so I think in terms of events and WaitOnMultipleObjects) until it completes. How did Jeff do it in Asp.Net and is his method applicable to the Java web-app world?
java
events
null
null
null
null
open
Running a regular background event in Java web app === In podcast #15, Jeff mentioned he twittered about how to run a regular event in the background as if it was a normal function - unfortunately I can't seem to find that through twitter. Now I need to do a similar thing and was going to throw the question to the masses. My current plan is when the first user (probably me) enters the site it starts a background thread that waits until the alloted time (hourly on the hour) and then kicks off the event blocking the others (I am a Windows programmer by trade so I think in terms of events and WaitOnMultipleObjects) until it completes. How did Jeff do it in Asp.Net and is his method applicable to the Java web-app world?
0
48,299
09/07/2008 10:36:30
115
08/02/2008 05:44:40
981
108
C++ UI resources.
No that I know C++ i want to get into desktop application that have a UI instead of Command Prompt stuff, where should I start, and what are some good online resources?
c++
gui
resources
null
null
null
open
C++ UI resources. === No that I know C++ i want to get into desktop application that have a UI instead of Command Prompt stuff, where should I start, and what are some good online resources?
0
48,307
09/07/2008 10:54:11
3,394
08/28/2008 12:35:39
1,831
81
Fundamental Data Structures in C#
I would like to know how people implement the following data structures in C# without using the base class library implementations:- - Linked List - Hash Table - Binary Search Tree - Red-Black Tree - B-Tree - Binomial Heap - Fibonacci Heap and any other fundamental data structures people can think of! I am curious as I want to improve my understanding of these data structures and it'd be nice to see C# versions rather than the typical C examples out there on the internet!
c#
.net
data-structures
self-improvement
null
null
open
Fundamental Data Structures in C# === I would like to know how people implement the following data structures in C# without using the base class library implementations:- - Linked List - Hash Table - Binary Search Tree - Red-Black Tree - B-Tree - Binomial Heap - Fibonacci Heap and any other fundamental data structures people can think of! I am curious as I want to improve my understanding of these data structures and it'd be nice to see C# versions rather than the typical C examples out there on the internet!
0
48,320
09/07/2008 11:06:48
5,010
09/07/2008 10:46:59
1
1
Best Ruby on Rails social networking framework
I'm planning on creating a social networking + MP3 lecture downloading / browsing / commenting / discovery website using Ruby on Rails. Partially for fun and also as a means to learn some Ruby on Rails. I'm looking for a social networking framework that I can use as a basis for my site. I don't want to re-invent the wheel. Searching the web I found three such frameworks. Which of these three would you recommend using and why? http://portal.insoshi.com/ http://www.communityengine.org/ http://lovdbyless.com/
ruby
ruby-on-rails
website
socialnetworking
null
null
open
Best Ruby on Rails social networking framework === I'm planning on creating a social networking + MP3 lecture downloading / browsing / commenting / discovery website using Ruby on Rails. Partially for fun and also as a means to learn some Ruby on Rails. I'm looking for a social networking framework that I can use as a basis for my site. I don't want to re-invent the wheel. Searching the web I found three such frameworks. Which of these three would you recommend using and why? http://portal.insoshi.com/ http://www.communityengine.org/ http://lovdbyless.com/
0
48,322
09/07/2008 11:07:44
577
08/06/2008 21:36:25
383
16
Best practices for integrating third-party modules into your app
We have a few projects that involve building an application that is composed of maybe 50% custom functionality, but then pulls in, say, a wiki, a forum, and other components that are "wheels" that have already been invented that we do not wish to re-write from scratch. These third-party applications usually have their own databases, themes, and authentication systems. Getting things to work like a single-sign-on, or a common theme, or tagging/searching across entities in multiple sub-apps are pretty challenging problems, in my experience. What are some of the best practices for this kind of integration project? Our approach, so far, has been to try and pick your components carefully, choosing ones that have a clearly defined API, preferably via HTTP (like REST or SOAP), though that isn't always possible (we haven't found a decent forum that works that way). Are there suggestions folks can give to anyone trying to do this, as I suspect many of us are more and more frequently these days?
architecture
system-integration
null
null
null
null
open
Best practices for integrating third-party modules into your app === We have a few projects that involve building an application that is composed of maybe 50% custom functionality, but then pulls in, say, a wiki, a forum, and other components that are "wheels" that have already been invented that we do not wish to re-write from scratch. These third-party applications usually have their own databases, themes, and authentication systems. Getting things to work like a single-sign-on, or a common theme, or tagging/searching across entities in multiple sub-apps are pretty challenging problems, in my experience. What are some of the best practices for this kind of integration project? Our approach, so far, has been to try and pick your components carefully, choosing ones that have a clearly defined API, preferably via HTTP (like REST or SOAP), though that isn't always possible (we haven't found a decent forum that works that way). Are there suggestions folks can give to anyone trying to do this, as I suspect many of us are more and more frequently these days?
0
48,338
09/07/2008 11:39:54
209
08/03/2008 13:54:19
63
5
Am I allowed to run a javascript runtime (like v8) on the iPhone?
According to [this discussion][1], the iphone agreement says that it doesn't allow "loading of plugins or running interpreted code that has been downloaded". Technically, I **would** like to download scripts from our server (embedded in a proprietary protocol). Does this mean I wouldn't be allowed to run a runtime like v8 in an iphone app? This is probably more of a legal question. [1]: http://groups.google.com/group/v8-users/browse_thread/thread/3f57f8d1c31806a5
c++
javascript
iphone
law
null
null
open
Am I allowed to run a javascript runtime (like v8) on the iPhone? === According to [this discussion][1], the iphone agreement says that it doesn't allow "loading of plugins or running interpreted code that has been downloaded". Technically, I **would** like to download scripts from our server (embedded in a proprietary protocol). Does this mean I wouldn't be allowed to run a runtime like v8 in an iphone app? This is probably more of a legal question. [1]: http://groups.google.com/group/v8-users/browse_thread/thread/3f57f8d1c31806a5
0
48,340
09/07/2008 11:41:41
4,215
09/02/2008 11:07:44
33
4
Cannot handle FaultException
i have a wcf service that does an operation. and in this operation there could be a fault. i have stated that there could be a fault in my service contract. here is the code below; public void Foo() { try { DoSomething(); // throws FaultException<FooFault> } catch (FaultException) { throw; } catch (Exception ex) { myProject.Exception.Throw<FooFault>(ex); } } in service contract; [FaultException(typeof(FooFault))] void Foo(); when a FaultException<FooFault> was thrown by DoSomething() method while i was running the application, firstly the exception was caught at "catch(Exception ex)" line and breaks in there. then when i pressed f5 again, it does what normally it has to. i wonder why that break exists? and if not could it be problem on publish?
c#
exception
wcf
null
null
null
open
Cannot handle FaultException === i have a wcf service that does an operation. and in this operation there could be a fault. i have stated that there could be a fault in my service contract. here is the code below; public void Foo() { try { DoSomething(); // throws FaultException<FooFault> } catch (FaultException) { throw; } catch (Exception ex) { myProject.Exception.Throw<FooFault>(ex); } } in service contract; [FaultException(typeof(FooFault))] void Foo(); when a FaultException<FooFault> was thrown by DoSomething() method while i was running the application, firstly the exception was caught at "catch(Exception ex)" line and breaks in there. then when i pressed f5 again, it does what normally it has to. i wonder why that break exists? and if not could it be problem on publish?
0
48,344
09/07/2008 11:44:42
4,833
09/05/2008 20:24:35
162
6
Useful browser plugins for openid authentication?
I've read <http://stackoverflow.com/questions/41354/is-the-stackoverflow-login-situation-bearable> and must agree to a certain point that openid (for me) makes it more difficult to log in. Not a show stoper but I'm used to opening the front page of the site, there's a small login form, firefox' password manager already filled in the correct values, submit, done. One click. Here - and it's currently the only site with openid I use - the password/form manager doesn't even fill in my "login id". I often close all browser windows and all cookies are erased - and I would like to keep it this way. Are there any firefox plugins you would recommend that make the login process easier? Maybe something that checks my status at myOpenId and performs the login if necessary.
stackoverflow
firefox
openid
null
null
null
open
Useful browser plugins for openid authentication? === I've read <http://stackoverflow.com/questions/41354/is-the-stackoverflow-login-situation-bearable> and must agree to a certain point that openid (for me) makes it more difficult to log in. Not a show stoper but I'm used to opening the front page of the site, there's a small login form, firefox' password manager already filled in the correct values, submit, done. One click. Here - and it's currently the only site with openid I use - the password/form manager doesn't even fill in my "login id". I often close all browser windows and all cookies are erased - and I would like to keep it this way. Are there any firefox plugins you would recommend that make the login process easier? Maybe something that checks my status at myOpenId and performs the login if necessary.
0
48,356
09/07/2008 11:56:49
5,021
09/07/2008 11:56:49
1
0
Can't Re-bind a socket to an existing IP/Port Combination
Greetings, I'm trying to find a way to 'unbind' a socket from a particular IP/Port combination. My pseudocode looks like this: ClassA a = new ClassA(); //(class A instantiates socket and binds it to 127.0.0.1:4567) //do something //...much later, a has been garbage-collected away. ClassA aa = new ClassA(); //crash here. At this point, .Net informs me that I've already got a socket bound to 127.0.0.1:4567, which is technically true. But no matter what code I put in ClassA's destructor, or no matter what functions I call on the socket (I've tried .Close() and .Disconnect(true)), the socket remains proudly bound to 127.0.0.1:4567. What do I do to be able to 'un-bind' the socket? Any help would be appreciated!
networking
c#
sockets
.net
null
null
open
Can't Re-bind a socket to an existing IP/Port Combination === Greetings, I'm trying to find a way to 'unbind' a socket from a particular IP/Port combination. My pseudocode looks like this: ClassA a = new ClassA(); //(class A instantiates socket and binds it to 127.0.0.1:4567) //do something //...much later, a has been garbage-collected away. ClassA aa = new ClassA(); //crash here. At this point, .Net informs me that I've already got a socket bound to 127.0.0.1:4567, which is technically true. But no matter what code I put in ClassA's destructor, or no matter what functions I call on the socket (I've tried .Close() and .Disconnect(true)), the socket remains proudly bound to 127.0.0.1:4567. What do I do to be able to 'un-bind' the socket? Any help would be appreciated!
0
48,365
09/07/2008 12:04:24
2,131
08/20/2008 13:45:48
1,744
130
Is tagging organizationally superior to discrete subforums?
I am interested in choosing a good structure for an online message board-type application. I will use SO as an example, as I think it's an example that we are all familiar with, but my question is more general; it is about how to achieve the right balance between organization and flexibility in online message boards. The questions page is a load of random stuff. It moves quickly (some might say, too quickly) and contains a huge number of questions that I'm not interested in. The idea, I imagine, is that we can use tags to find questions that we're interested in. However, I'm not sure that this works: you can't use tags negatively. I'm _not_ interested in PHP or perl or web development. I want to _exclude_ such posts. But with the tags, I can't. Although discrete subforums are in a sense less flexible, as they generally force you to pick a category even if a question might fit into two (if SO had, say, areas for "Web Development", "Games development", "Computer Science", "Systems Programming", "Databases", etc. then sure, some people might want to post about developing of web-based games, for example) is it worth sacrificing some of that flexibility in order to make it easier to find the content that you are interested in, and hide the content that you are not interested in? Is there any way with a pure tagging system to achieve the greater ease of use that subforums provide?
design
tags
null
null
null
null
open
Is tagging organizationally superior to discrete subforums? === I am interested in choosing a good structure for an online message board-type application. I will use SO as an example, as I think it's an example that we are all familiar with, but my question is more general; it is about how to achieve the right balance between organization and flexibility in online message boards. The questions page is a load of random stuff. It moves quickly (some might say, too quickly) and contains a huge number of questions that I'm not interested in. The idea, I imagine, is that we can use tags to find questions that we're interested in. However, I'm not sure that this works: you can't use tags negatively. I'm _not_ interested in PHP or perl or web development. I want to _exclude_ such posts. But with the tags, I can't. Although discrete subforums are in a sense less flexible, as they generally force you to pick a category even if a question might fit into two (if SO had, say, areas for "Web Development", "Games development", "Computer Science", "Systems Programming", "Databases", etc. then sure, some people might want to post about developing of web-based games, for example) is it worth sacrificing some of that flexibility in order to make it easier to find the content that you are interested in, and hide the content that you are not interested in? Is there any way with a pure tagging system to achieve the greater ease of use that subforums provide?
0
48,366
09/07/2008 12:06:53
209
08/03/2008 13:54:19
63
5
Design crowd sourcing
I'm looking to get a logo designed, but all my designer friends/colleagues are pretty busy. Since I've never done it before, I thought it would be interesting to crowd source the design. Does anyone know of any good design crowd sourcing sites?
design
graphics
null
null
null
null
open
Design crowd sourcing === I'm looking to get a logo designed, but all my designer friends/colleagues are pretty busy. Since I've never done it before, I thought it would be interesting to crowd source the design. Does anyone know of any good design crowd sourcing sites?
0
48,381
09/07/2008 12:34:09
5,024
09/07/2008 12:34:09
1
0
Generating Documentation from C# XML Comments
I've recently started a new project and I'm using C# for the first time. I've found that while Visual Studio is helpful in creating C#'s XML comments to document your classes and methods, there's not much you can do to generate MSDN or Javadoc style documentation. Google tells me that Visual Studio 2003 included a tool to generate such documentation, but it is not longer included in later versions of the IDE. What are my options if I wish to make use of my carefully crafted (I assure you!) XML markup?
c#
documentation
comments
null
null
null
open
Generating Documentation from C# XML Comments === I've recently started a new project and I'm using C# for the first time. I've found that while Visual Studio is helpful in creating C#'s XML comments to document your classes and methods, there's not much you can do to generate MSDN or Javadoc style documentation. Google tells me that Visual Studio 2003 included a tool to generate such documentation, but it is not longer included in later versions of the IDE. What are my options if I wish to make use of my carefully crafted (I assure you!) XML markup?
0
48,386
09/07/2008 12:36:38
4,216
09/02/2008 11:21:18
8
4
Sprint velocity calculations
Need some advice on working out the team velocity for a sprint. Our team normally consists of about 4 developers and 2 testers. The scrum master insists that every team member should contribute equally to the velocity calculation i.e. we should not distinguish between developers and testers when working out how much we can do in a sprint. The is correct according to Scrum, but here's the problem. Despite suggestions to the contrary, testers never help with non-test tasks and developers never help with non-dev tasks, so we are not cross functional team members at all. Also, despite various suggestions, testers normally spend the first few days of each sprint waiting for something to test. The end result is that typically we take on far more dev work than we actually have capacity for in the sprint. For example, the developers might contribute 20 days to the velocity calculation and the testers 10 days. If you add up the tasks after sprint planning though, dev tasks add up to 25 days and test tasks add up to 5 days. How do you guys deal with this sort of situation?
project-management
agile
scrum
methodology
null
null
open
Sprint velocity calculations === Need some advice on working out the team velocity for a sprint. Our team normally consists of about 4 developers and 2 testers. The scrum master insists that every team member should contribute equally to the velocity calculation i.e. we should not distinguish between developers and testers when working out how much we can do in a sprint. The is correct according to Scrum, but here's the problem. Despite suggestions to the contrary, testers never help with non-test tasks and developers never help with non-dev tasks, so we are not cross functional team members at all. Also, despite various suggestions, testers normally spend the first few days of each sprint waiting for something to test. The end result is that typically we take on far more dev work than we actually have capacity for in the sprint. For example, the developers might contribute 20 days to the velocity calculation and the testers 10 days. If you add up the tasks after sprint planning though, dev tasks add up to 25 days and test tasks add up to 5 days. How do you guys deal with this sort of situation?
0
48,390
09/07/2008 12:40:23
3,686
08/29/2008 22:03:28
1
0
Eclipse spelling engine does not exist
I'm using Eclipse 3.4 (Ganymede) with CDT 5 on Windows. When the integrated spell checker doesn't know some word, it proposes (among others) the option to add the word to a user dictionary. If the user dictionary doesn't exist yet, the spell checker offers then to help configuring it and shows the "General/Editors/Text Editors/Spelling" preference pane. This preference pane however states that **"The selected spelling engine does not exist"**, but has no control to add or install an engine. How can I put a spelling engine in existence?
eclipse
spellchecking
null
null
null
null
open
Eclipse spelling engine does not exist === I'm using Eclipse 3.4 (Ganymede) with CDT 5 on Windows. When the integrated spell checker doesn't know some word, it proposes (among others) the option to add the word to a user dictionary. If the user dictionary doesn't exist yet, the spell checker offers then to help configuring it and shows the "General/Editors/Text Editors/Spelling" preference pane. This preference pane however states that **"The selected spelling engine does not exist"**, but has no control to add or install an engine. How can I put a spelling engine in existence?
0
48,397
09/07/2008 12:52:12
3,153
08/27/2008 02:45:05
648
27
.Net 3.5 silent installer?
Is there a redistributable .Net 3.5 installation package that is a silent installer? Or alternatively, is there a switch that can be passed to the main redistributable .Net 3.5 installer to make it silent?
.net
.net-3.5
installer
installation
redistributable
null
open
.Net 3.5 silent installer? === Is there a redistributable .Net 3.5 installation package that is a silent installer? Or alternatively, is there a switch that can be passed to the main redistributable .Net 3.5 installer to make it silent?
0
48,425
09/07/2008 13:21:12
445,087
09/02/2008 17:25:48
162
5
What are the best resources to get started with Eclipse plugin development?
I'm interested in writing eclipse plugins where do I start? What resources have helped you? I'm looking for: 1. Tutorials 2. Sites devoted to plugin development 3. Books
eclipse
books
tutorials
plugin-development
sites
07/27/2012 10:20:18
not constructive
What are the best resources to get started with Eclipse plugin development? === I'm interested in writing eclipse plugins where do I start? What resources have helped you? I'm looking for: 1. Tutorials 2. Sites devoted to plugin development 3. Books
4
48,426
09/07/2008 13:26:57
445,087
09/02/2008 17:25:48
167
5
What's the best tool to graphically display memory layout from a .map file?
My build (gcc) toolchain produces a .map file. Is there a tool to analyze the memory map graphically?
c++
c
embedded
linker
null
null
open
What's the best tool to graphically display memory layout from a .map file? === My build (gcc) toolchain produces a .map file. Is there a tool to analyze the memory map graphically?
0
48,432
09/07/2008 13:33:25
4,396
09/03/2008 13:37:03
131
10
Pros & cons between LINQ and traditional collection based approaches
Being relatively new to the .net game, I was wondering, has anyone had any experience of the pros / cons between the use of LINQ and what could be considered more traditional methods working with lists / collections? For a specific example of a project I'm working on : a list of unique id / name pairs are being retrieved from a remote web-service. - this list will change infrequently (once per day), - will be read-only from the point of view of the application where it is being used - will be stored at the application level for all requests to access Given those points, I plan to store the returned values at the application level in a singleton class. My initial approach was to iterate through the list returned from the remote service and store it in a NameValueCollection in a singleton class, with methods to retrieve from the collection based on an id: sugarsoap soapService = new sugarsoap(); branch_summary[] branchList = soapService.getBranches(); foreach (branch_summary aBranch in branchList) { branchNameList.Add(aBranch.id, aBranch.name); } The alternative using LINQ is to simply add a method that works on the list directly once it has been retrieved: public string branchName (string branchId) { //branchList populated in the constructor branch_summary bs = from b in branchList where b.id == branchId select b; return branch_summary.name; } Is either better than the other - is there a third way? I'm open to all answers, for both approaches and both in terms of solutions that offer elegance, and those which benefit performance.
c#
linq
null
null
null
null
open
Pros & cons between LINQ and traditional collection based approaches === Being relatively new to the .net game, I was wondering, has anyone had any experience of the pros / cons between the use of LINQ and what could be considered more traditional methods working with lists / collections? For a specific example of a project I'm working on : a list of unique id / name pairs are being retrieved from a remote web-service. - this list will change infrequently (once per day), - will be read-only from the point of view of the application where it is being used - will be stored at the application level for all requests to access Given those points, I plan to store the returned values at the application level in a singleton class. My initial approach was to iterate through the list returned from the remote service and store it in a NameValueCollection in a singleton class, with methods to retrieve from the collection based on an id: sugarsoap soapService = new sugarsoap(); branch_summary[] branchList = soapService.getBranches(); foreach (branch_summary aBranch in branchList) { branchNameList.Add(aBranch.id, aBranch.name); } The alternative using LINQ is to simply add a method that works on the list directly once it has been retrieved: public string branchName (string branchId) { //branchList populated in the constructor branch_summary bs = from b in branchList where b.id == branchId select b; return branch_summary.name; } Is either better than the other - is there a third way? I'm open to all answers, for both approaches and both in terms of solutions that offer elegance, and those which benefit performance.
0
48,439
09/07/2008 13:42:08
51
08/01/2008 13:31:13
1,926
85
How Much Time Should be Allotted for Testing & Bug Fixing
Every time I have to estimate time for a project (or review someone else's estimate), time is allotted for testing/bug fixing that will be done between the alpha and production releases. I know very well that estimating so far into the future regarding a problem-set of unknown size is not a good recipe for a successful estimate. However for a variety of reasons, a defined number of hours invariably gets assigned at the outset to this segment of work. And the farther off this initial estimate is from the real, final value, the more grief those involved with the debugging will have to take later on when they go "over" the estimate. So my question is: what is the best strategy you have seen with regards to making estimates like this? A flat percentage of the overall dev estimate? Set number of hours (with the expectation that it will go up)? Something else?
project-management
estimation
null
null
null
null
open
How Much Time Should be Allotted for Testing & Bug Fixing === Every time I have to estimate time for a project (or review someone else's estimate), time is allotted for testing/bug fixing that will be done between the alpha and production releases. I know very well that estimating so far into the future regarding a problem-set of unknown size is not a good recipe for a successful estimate. However for a variety of reasons, a defined number of hours invariably gets assigned at the outset to this segment of work. And the farther off this initial estimate is from the real, final value, the more grief those involved with the debugging will have to take later on when they go "over" the estimate. So my question is: what is the best strategy you have seen with regards to making estimates like this? A flat percentage of the overall dev estimate? Set number of hours (with the expectation that it will go up)? Something else?
0
48,442
09/07/2008 13:46:15
1,294
08/14/2008 12:43:42
11
2
Rule of thumb for choosing an implementation of a Java Collection?
Anyone have a good rule of thumb for choosing between different implementations of Java Collection interfaces like List, Map, or Set? For example, generally why or in what cases would I prefer to use a Vector or an ArrayList, a HashTable or a HashMap?
java
collections
heuristics
null
null
null
open
Rule of thumb for choosing an implementation of a Java Collection? === Anyone have a good rule of thumb for choosing between different implementations of Java Collection interfaces like List, Map, or Set? For example, generally why or in what cases would I prefer to use a Vector or an ArrayList, a HashTable or a HashMap?
0