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
53,497
09/10/2008 05:57:24
4,883
09/06/2008 10:24:59
514
5
Regular expression that matches valid IPv6 addresses
I'm having trouble writing a regular expression that matches valid IPv6 addresses, including those in their compressed form (with "::" or leading zeros omitted from each byte pair). Can someone suggest a regular expression that would fulfill the requirement? I'm considering expanding each byte pair and matching the result with a simpler regex.
regex
networking
null
null
null
null
open
Regular expression that matches valid IPv6 addresses === I'm having trouble writing a regular expression that matches valid IPv6 addresses, including those in their compressed form (with "::" or leading zeros omitted from each byte pair). Can someone suggest a regular expression that would fulfill the requirement? I'm considering expanding each byte pair and matching the result with a simpler regex.
0
53,501
09/10/2008 06:04:13
2,361
08/21/2008 20:41:09
490
26
It is possible to determine which process starts my .Net application?
I am developing console application in .Net and I want to change a behavior a little based on information that application was started from cmd.exe or from explorer.exe. Is it possible?
.net
windows
process-management
null
null
null
open
It is possible to determine which process starts my .Net application? === I am developing console application in .Net and I want to change a behavior a little based on information that application was started from cmd.exe or from explorer.exe. Is it possible?
0
53,511
09/10/2008 06:19:42
4,474
09/04/2008 01:17:32
1
3
Plain text passwords in Ruby on Rails using Restful_Authentication
If i use restful_authentication in my ruby on rails app are passwords transfered between the broswer and the server in paintext? And if so how worried should I be about it?
ruby
rest
authentication
null
null
null
open
Plain text passwords in Ruby on Rails using Restful_Authentication === If i use restful_authentication in my ruby on rails app are passwords transfered between the broswer and the server in paintext? And if so how worried should I be about it?
0
53,513
09/10/2008 06:20:11
4,872
09/06/2008 09:14:55
83
2
In Python, what is the best way to check if a list is empty?
For example, if passed the following: a = [] How do I check to see if 'a' is empty?
python
list
null
null
null
null
open
In Python, what is the best way to check if a list is empty? === For example, if passed the following: a = [] How do I check to see if 'a' is empty?
0
53,527
09/10/2008 06:33:55
4,872
09/06/2008 09:14:55
83
2
How can you unit test a database in SQL Server?
What are some of the ways? What frameworks can you use?
sql-server
unit-testing
mssql
null
null
null
open
How can you unit test a database in SQL Server? === What are some of the ways? What frameworks can you use?
0
53,532
09/10/2008 06:42:34
1,702
08/18/2008 05:39:28
16
6
Unit-testing servlets
I have a bunch of servlets running under the Tomcat servlet container. I would like to separate test code from production code, so I considered using a test framework. JUnit is nicely integrated into Eclipse, but I failed to make it run servlets using a running Tomcat server. Could you please recommend a unit testing framework that supports testing Tomcat servlets? Eclipse integration is nice but not necessary.
unit-testing
eclipse
tomcat
servlets
junit
null
open
Unit-testing servlets === I have a bunch of servlets running under the Tomcat servlet container. I would like to separate test code from production code, so I considered using a test framework. JUnit is nicely integrated into Eclipse, but I failed to make it run servlets using a running Tomcat server. Could you please recommend a unit testing framework that supports testing Tomcat servlets? Eclipse integration is nice but not necessary.
0
53,538
09/10/2008 06:56:15
1,612
08/17/2008 14:52:15
392
30
MSSQL Freetext match - how do I sort by relevance
Is it possible to order results in MS SQL Server 2005 by the relevance of a freetext match? In MySQL you can use the (roughly equivalent) MATCH function in the ORDER BY section, but I haven't found any equivalence in MSSQL. From the [MySQL docs][1]: > For each row in the table, MATCH() returns a relevance value; that is, a similarity measure between the search string and the text in that row in the columns named in the MATCH() list. So for example you could order by the number of votes, then this relevance, and finally by a creation date. Is this something that can be done, or am I stuck with just returning the matching values and not having this ordering ability? [1]: http://dev.mysql.com/doc/refman/5.0/en/fulltext-natural-language.html
sql
mssql
full-text-search
freetext
null
null
open
MSSQL Freetext match - how do I sort by relevance === Is it possible to order results in MS SQL Server 2005 by the relevance of a freetext match? In MySQL you can use the (roughly equivalent) MATCH function in the ORDER BY section, but I haven't found any equivalence in MSSQL. From the [MySQL docs][1]: > For each row in the table, MATCH() returns a relevance value; that is, a similarity measure between the search string and the text in that row in the columns named in the MATCH() list. So for example you could order by the number of votes, then this relevance, and finally by a creation date. Is this something that can be done, or am I stuck with just returning the matching values and not having this ordering ability? [1]: http://dev.mysql.com/doc/refman/5.0/en/fulltext-natural-language.html
0
53,543
09/10/2008 07:04:43
4,491
09/04/2008 06:44:23
288
6
What are some strategies to write python code that works in python, jython and ironpython
Having tries to target two of these environments at the same time I can safely say the if you have to use a database etc. you end up having to write unique code for that environment. Have you got a great way to handle this situation?
python
ironpython
jython
null
null
null
open
What are some strategies to write python code that works in python, jython and ironpython === Having tries to target two of these environments at the same time I can safely say the if you have to use a database etc. you end up having to write unique code for that environment. Have you got a great way to handle this situation?
0
53,545
09/10/2008 07:05:13
3,834
08/31/2008 06:25:52
24
4
Get the App.Config of Another Exe
I have an exe with an App.Config file. Now I want to create a wrapper dll around the exe in order to consume some of the functionalities. The question is how can I access the app.config property in the exe from the wrapper dll?
c#
null
null
null
null
null
open
Get the App.Config of Another Exe === I have an exe with an App.Config file. Now I want to create a wrapper dll around the exe in order to consume some of the functionalities. The question is how can I access the app.config property in the exe from the wrapper dll?
0
53,555
09/10/2008 07:16:30
4,491
09/04/2008 06:44:23
288
6
How would you go about for switching a site from Prototype to jQuery
I have written a site in Prototype but want to switch to jQuery. Any ideas on how best make the switch?
javascript
jquery
prototype
null
null
null
open
How would you go about for switching a site from Prototype to jQuery === I have written a site in Prototype but want to switch to jQuery. Any ideas on how best make the switch?
0
53,558
09/10/2008 07:25:05
4,189
09/02/2008 09:19:58
16
6
Favorite advanced F# tutorial
I am looking into F# and have read a few "Hello World!" intros that shows off the very basic syntax of the language. I am now ready to move on and try more advanced features, ie. functional programming styles. So my question is: What is your favorite advanced level tutorial on F#. I am not interested in basic introductions!
f#
functional-programming
null
null
null
null
open
Favorite advanced F# tutorial === I am looking into F# and have read a few "Hello World!" intros that shows off the very basic syntax of the language. I am now ready to move on and try more advanced features, ie. functional programming styles. So my question is: What is your favorite advanced level tutorial on F#. I am not interested in basic introductions!
0
53,562
09/10/2008 07:32:38
2,670
08/24/2008 10:03:28
285
24
Enabling Hibernate second-level cache with JPA on JBoss 4.2
What are the steps required to enable Hibernate's second-level cache, when using the Java Persistence API (annotated entities)? How do I check that it's working? I'm using JBoss 4.2.2.GA. From the Hibernate documentation, it seems that I need to enable the cache and specify a cache provider in *persistence.xml*, like: <property name="hibernate.cache.use_second_level_cache" value="true" /> <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" /> What else is required? Do I need to add *@Cache* annotations to my JPA entities? How can I tell if the cache is working? I have tried accessing cache statistics after running a Query, but *Statistics.getSecondLevelCacheStatistics* returns null, perhaps because I don't know what 'region' name to use.
java
hibernate
caching
jpa
null
null
open
Enabling Hibernate second-level cache with JPA on JBoss 4.2 === What are the steps required to enable Hibernate's second-level cache, when using the Java Persistence API (annotated entities)? How do I check that it's working? I'm using JBoss 4.2.2.GA. From the Hibernate documentation, it seems that I need to enable the cache and specify a cache provider in *persistence.xml*, like: <property name="hibernate.cache.use_second_level_cache" value="true" /> <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider" /> What else is required? Do I need to add *@Cache* annotations to my JPA entities? How can I tell if the cache is working? I have tried accessing cache statistics after running a Query, but *Statistics.getSecondLevelCacheStatistics* returns null, perhaps because I don't know what 'region' name to use.
0
53,569
09/10/2008 07:44:53
893
08/10/2008 08:27:00
2,422
105
How to get the changes on a branch in git
What is the best way to get a log of commits on a branch since the time it was branched from the current branch? My solution so far is: git log $(git merge-base HEAD branch)..branch The documentation for [git-diff](http://www.kernel.org/pub/software/scm/git/docs/git-diff.html) indicates that "git diff A...B" is equivalent to "git diff $(git-merge-base A B) B". On the other hand, the documentation for [git-rev-parse](http://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html) indicates that "r1...r2" is defined as "r1 r2 --not $(git merge-base --all r1 r2)". Why are these different? Note that "git diff HEAD...branch" gives me the diffs I want, but the corresponding git log command gives me more than what I want. In pictures, suppose this: <pre> x---y---z---branch / ---a---b---c---d---e---HEAD </pre> I would like to get a log containing commits x, y, z. "git diff HEAD...branch" gives these commits. However, "git log HEAD...branch" gives x, y, z, c, d, e.
git
branch
null
null
null
null
open
How to get the changes on a branch in git === What is the best way to get a log of commits on a branch since the time it was branched from the current branch? My solution so far is: git log $(git merge-base HEAD branch)..branch The documentation for [git-diff](http://www.kernel.org/pub/software/scm/git/docs/git-diff.html) indicates that "git diff A...B" is equivalent to "git diff $(git-merge-base A B) B". On the other hand, the documentation for [git-rev-parse](http://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html) indicates that "r1...r2" is defined as "r1 r2 --not $(git merge-base --all r1 r2)". Why are these different? Note that "git diff HEAD...branch" gives me the diffs I want, but the corresponding git log command gives me more than what I want. In pictures, suppose this: <pre> x---y---z---branch / ---a---b---c---d---e---HEAD </pre> I would like to get a log containing commits x, y, z. "git diff HEAD...branch" gives these commits. However, "git log HEAD...branch" gives x, y, z, c, d, e.
0
53,583
09/10/2008 07:58:07
2,152
08/20/2008 16:02:25
1
0
NMBLookup OS X returning inconsistant results
We're trying to get SMB volume listings in our OS X application, and have been using NMBLookup, as suggested by Apple, to get listings. However, more often than not, we're not able to get a full listing of available SMB volumes using the tool. We've got a good benchmark in that we can see the full listing the Apple Finder gets, and the majority of the time, our listing is not matching up, usually missing servers. We're tried a number ways of executing the command, but haven't yet found anything that brings us back a complete listing. nmblookup -M -- - nmblookup '*' etc Does anyone know what we could be doing wrong, or know of a better way to query for SMB volumes available on local subnets? Many thanks Paul
osx
smb
finder
null
null
null
open
NMBLookup OS X returning inconsistant results === We're trying to get SMB volume listings in our OS X application, and have been using NMBLookup, as suggested by Apple, to get listings. However, more often than not, we're not able to get a full listing of available SMB volumes using the tool. We've got a good benchmark in that we can see the full listing the Apple Finder gets, and the majority of the time, our listing is not matching up, usually missing servers. We're tried a number ways of executing the command, but haven't yet found anything that brings us back a complete listing. nmblookup -M -- - nmblookup '*' etc Does anyone know what we could be doing wrong, or know of a better way to query for SMB volumes available on local subnets? Many thanks Paul
0
53,597
09/10/2008 08:08:55
4,884
09/06/2008 10:28:40
26
3
How do I compose existing Linq Expressions
I want to compose the results of two Linq Expressions. They exist in the form Expression<Func<T, bool>> So the two that I want to compose are essentially delegates on a parameter (of type T) that both return a boolean. The result I would like composed would be the logical evaluation of the booleans. I would probably implement it as an extension method so my syntax would be something like: Expression<Func<User, bool>> expression1 = t => t.Name == "steve"; Expression<Func<User, bool>> expression2 = t => t.Age == 28; Expression<Func<User, bool>> composedExpression = expression1.And(expression2); And later on in my code I want to evaluate the composed expression var user = new User(); bool evaluated = composedExpression.Compile().Invoke(user); I have poked around with a few different ideas but I fear that it is more complex than I had hoped. How is this done?
c#
linq
null
null
null
null
open
How do I compose existing Linq Expressions === I want to compose the results of two Linq Expressions. They exist in the form Expression<Func<T, bool>> So the two that I want to compose are essentially delegates on a parameter (of type T) that both return a boolean. The result I would like composed would be the logical evaluation of the booleans. I would probably implement it as an extension method so my syntax would be something like: Expression<Func<User, bool>> expression1 = t => t.Name == "steve"; Expression<Func<User, bool>> expression2 = t => t.Age == 28; Expression<Func<User, bool>> composedExpression = expression1.And(expression2); And later on in my code I want to evaluate the composed expression var user = new User(); bool evaluated = composedExpression.Compile().Invoke(user); I have poked around with a few different ideas but I fear that it is more complex than I had hoped. How is this done?
0
53,599
09/10/2008 08:10:11
4,880
09/06/2008 10:12:37
6
0
regex for parsing resource (.rc) files
Ulimately I just wanted to extract strings from the .rc file so I could translate them, but anything that goes with .rc files works for me.
c++
regex
mfc
internationalization
null
null
open
regex for parsing resource (.rc) files === Ulimately I just wanted to extract strings from the .rc file so I could translate them, but anything that goes with .rc files works for me.
0
53,609
09/10/2008 08:21:02
123
08/02/2008 08:01:26
1,321
66
What does 'foo' really mean?
I hope this qualifies as a programming question, as in any programming tutorial, you eventually come across 'foo' in the code examples. (yeah, right?) what does 'foo' really mean? If it is meant to mean **nothing**, when did it begin to be used so? Cheers
language-agnostic
coding-style
example
null
null
null
open
What does 'foo' really mean? === I hope this qualifies as a programming question, as in any programming tutorial, you eventually come across 'foo' in the code examples. (yeah, right?) what does 'foo' really mean? If it is meant to mean **nothing**, when did it begin to be used so? Cheers
0
53,618
09/10/2008 08:26:32
4,980
09/07/2008 07:34:58
1
0
How to control IIS 5.1 from command line?
I found some informations about controlling IIS 5.1 from command line via adsutil.vbs (http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d3df4bc9-0954-459a-b5e6-7a8bc462960c.mspx?mfr=true). The utility is available at c:\InetPub\AdminScripts. The utility throw only errors like the following: ErrNumber: -2147463164 (0x80005004) Error Trying To GET the Schema of the property: IIS://localhost/Schema/ROOT Can you tell me, how to check if there exists a virtual directory and create it, if it does not exist? Thanks Thomas
iis
windows-xp
null
null
null
null
open
How to control IIS 5.1 from command line? === I found some informations about controlling IIS 5.1 from command line via adsutil.vbs (http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d3df4bc9-0954-459a-b5e6-7a8bc462960c.mspx?mfr=true). The utility is available at c:\InetPub\AdminScripts. The utility throw only errors like the following: ErrNumber: -2147463164 (0x80005004) Error Trying To GET the Schema of the property: IIS://localhost/Schema/ROOT Can you tell me, how to check if there exists a virtual directory and create it, if it does not exist? Thanks Thomas
0
53,621
09/10/2008 08:27:14
966
08/11/2008 07:35:55
51
5
Why is the 'Resource Pool' not supported on the current platform?
What could be the possible causes for the following exception? System.PlatformNotSupportedException: 'ResourcePool' is not supported on the current platform. at System.EnterpriseServices.Platform.Assert(Boolean fSuccess, String function) at System.EnterpriseServices.Platform.Assert(Version platform, String function) at System.EnterpriseServices.ResourcePool..ctor(TransactionEndDelegate cb) at System.Data.SqlClient.ConnectionPool..ctor(DefaultPoolControl ctrl) at System.Data.SqlClient.PoolManager.FindOrCreatePool(DefaultPoolControl ctrl) at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) at System.Data.SqlClient.SqlConnection.Open()
.net
sql-server
connection-pooling
null
null
null
open
Why is the 'Resource Pool' not supported on the current platform? === What could be the possible causes for the following exception? System.PlatformNotSupportedException: 'ResourcePool' is not supported on the current platform. at System.EnterpriseServices.Platform.Assert(Boolean fSuccess, String function) at System.EnterpriseServices.Platform.Assert(Version platform, String function) at System.EnterpriseServices.ResourcePool..ctor(TransactionEndDelegate cb) at System.Data.SqlClient.ConnectionPool..ctor(DefaultPoolControl ctrl) at System.Data.SqlClient.PoolManager.FindOrCreatePool(DefaultPoolControl ctrl) at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) at System.Data.SqlClient.SqlConnection.Open()
0
53,623
09/10/2008 08:27:45
184
08/03/2008 05:34:19
2,220
36
How to get whois information of a domain name in my program?
I want to get whois information of a domain name from my c#/java programs. Is there a simple way to do this?
c#
java
whois
domain-name
null
null
open
How to get whois information of a domain name in my program? === I want to get whois information of a domain name from my c#/java programs. Is there a simple way to do this?
0
53,627
09/10/2008 08:30:32
2,745
08/24/2008 20:58:00
297
18
How to deal with poorly informed customer choices
Here's a scenario I'm sure you're all familiar with. 1. You have a fairly "hands off" customer, who really doesn't want to get too involved in the decision making despite your best efforts. 2. An experienced development team spend hours discussing the pros and cons of a particular approach to a problem and come up with an elegant solution which avoids the pitfalls of the more obvious approaches. 3. The customer casually mentions after a quick glance that they want it changed. They have no understanding of all the usability / consistency issues you were trying to avoid in your very carefully thought out approach. 4. Despite explanations, customer isn't interested, they just want it changed. 5. You sigh and do what they ask, knowing full well what will happen next... 6. 3 weeks later, customer says it isn't working well this way, could you change it? You suggest again your original solution, and they seize on it with enthusiasm. They invariably seem to have had a form of selective amnesia and blocked out their role in messing this up in the first place. I'm sure many of you have gone through this. The thing which gets me is always when we know the time and effort that reasonably bright and able people have put in to really understanding the problem and trying to come up with a good solution. The frustration comes in contrasting this with the knowledge that the customer's choice is made in 3 minutes in a casual glance (or worse, by their managers who often don't even know what the project is really about). The icing on the cake is that it's usually made very late in the day. I know that the agile methodologies are designed to solve exactly this kind of problem, but it requires a level of customer buy in that certain types of customers (people spending other peoples money usually) are just not willing to give. Anyone any clever insight into how you deal with this? EDIT: Oops - by the way, I'm not talking about any current or recent customer in this. It's purely hypothetical...
methodology
customer
null
null
null
null
open
How to deal with poorly informed customer choices === Here's a scenario I'm sure you're all familiar with. 1. You have a fairly "hands off" customer, who really doesn't want to get too involved in the decision making despite your best efforts. 2. An experienced development team spend hours discussing the pros and cons of a particular approach to a problem and come up with an elegant solution which avoids the pitfalls of the more obvious approaches. 3. The customer casually mentions after a quick glance that they want it changed. They have no understanding of all the usability / consistency issues you were trying to avoid in your very carefully thought out approach. 4. Despite explanations, customer isn't interested, they just want it changed. 5. You sigh and do what they ask, knowing full well what will happen next... 6. 3 weeks later, customer says it isn't working well this way, could you change it? You suggest again your original solution, and they seize on it with enthusiasm. They invariably seem to have had a form of selective amnesia and blocked out their role in messing this up in the first place. I'm sure many of you have gone through this. The thing which gets me is always when we know the time and effort that reasonably bright and able people have put in to really understanding the problem and trying to come up with a good solution. The frustration comes in contrasting this with the knowledge that the customer's choice is made in 3 minutes in a casual glance (or worse, by their managers who often don't even know what the project is really about). The icing on the cake is that it's usually made very late in the day. I know that the agile methodologies are designed to solve exactly this kind of problem, but it requires a level of customer buy in that certain types of customers (people spending other peoples money usually) are just not willing to give. Anyone any clever insight into how you deal with this? EDIT: Oops - by the way, I'm not talking about any current or recent customer in this. It's purely hypothetical...
0
53,629
09/10/2008 08:32:20
1,428
08/15/2008 15:27:39
352
14
History of changes to a particular line of code in Subversion?
Is it possible to see the history of changes to a particular line of code in a Subversion repository? I'd like, for instance, to be able to see when a particular statement was added or when that statement was changed, even if its line number is not the same anymore.
subversion
null
null
null
null
null
open
History of changes to a particular line of code in Subversion? === Is it possible to see the history of changes to a particular line of code in a Subversion repository? I'd like, for instance, to be able to see when a particular statement was added or when that statement was changed, even if its line number is not the same anymore.
0
53,639
09/10/2008 08:37:39
4,491
09/04/2008 06:44:23
310
6
How would you go about using the ASP.NET Control Toolkit in a project that doesn't use ASP.NET on the back end
Your backend could be PHP or Python but you want to use the controls from the ASP.NET toolkit is there a successful way to do this?
asp.net
ajaxtoolkit
ajax
javascript
null
null
open
How would you go about using the ASP.NET Control Toolkit in a project that doesn't use ASP.NET on the back end === Your backend could be PHP or Python but you want to use the controls from the ASP.NET toolkit is there a successful way to do this?
0
53,649
09/10/2008 08:53:32
195
08/03/2008 11:02:15
139
9
creating an object without knowing the class name at design time
using reflection , I need to investigate a user DLL and create an object of a class in it. what is the simple way of doing it ?
c#
reflection
null
null
null
null
open
creating an object without knowing the class name at design time === using reflection , I need to investigate a user DLL and create an object of a class in it. what is the simple way of doing it ?
0
53,652
09/10/2008 08:56:27
3,263
08/27/2008 15:33:09
75
10
DataTable to readable text string
This might be a bit on the silly side of things but I need to send the contents of a DataTable (unknown columns, unknown contents) via a text e-mail. Basic ideea is to loop over rows and over columns and output all cell contents into a StringBuilder using .ToString(). Formatting is a big issue though. Any tips/ideeas on how to make this look "readable" in a text format ? I'm thkning on "padding" each cell with empty spaces, but I also need to split some cells into multiple lines, and this makes the StringBuilder approach a bit messy ( because the second line of text from the first column comes after the first line of text in the last column,etc.)
c#
datatable
formatting
null
null
null
open
DataTable to readable text string === This might be a bit on the silly side of things but I need to send the contents of a DataTable (unknown columns, unknown contents) via a text e-mail. Basic ideea is to loop over rows and over columns and output all cell contents into a StringBuilder using .ToString(). Formatting is a big issue though. Any tips/ideeas on how to make this look "readable" in a text format ? I'm thkning on "padding" each cell with empty spaces, but I also need to split some cells into multiple lines, and this makes the StringBuilder approach a bit messy ( because the second line of text from the first column comes after the first line of text in the last column,etc.)
0
53,664
09/10/2008 09:03:49
4,639
09/04/2008 23:07:22
45
1
How to effectively work with multiple files in vim?
I've started using vim to develop Perl scripts and am starting to find it very powerful. One thing I like is to be able to open multiple files at once with e.g. "vi main.pl maintenance.pl" and then hop between them with: :n :prev and see which file are open with :args And to add a file, I can say: :n test.pl which I expect would then be ADDED to my list of files, but instead it wipes out my current file list and when I type ":args" I only have "test.pl" open. So how can I ADD and REMOVE files to my args list?
vim
vi
null
null
null
null
open
How to effectively work with multiple files in vim? === I've started using vim to develop Perl scripts and am starting to find it very powerful. One thing I like is to be able to open multiple files at once with e.g. "vi main.pl maintenance.pl" and then hop between them with: :n :prev and see which file are open with :args And to add a file, I can say: :n test.pl which I expect would then be ADDED to my list of files, but instead it wipes out my current file list and when I type ":args" I only have "test.pl" open. So how can I ADD and REMOVE files to my args list?
0
53,666
09/10/2008 09:06:35
3,024
08/26/2008 12:30:57
233
12
Rhino Mocks - How can I test that at least one of a group of methods is called?
Say I have an interface IFoo which I am mocking. There are 3 methods on this interface. I need to test that the system under test calls at least one of the three methods. I don't care how many times, or with what arguments it does call, but the case where it ignores all the methods and does not touch the IFoo mock is the failure case. I've been looking through the Expect.Call documentation but can't see an easy way to do it. Any ideas?
unit-testing
mocking
rhino-mocks
bdd
null
null
open
Rhino Mocks - How can I test that at least one of a group of methods is called? === Say I have an interface IFoo which I am mocking. There are 3 methods on this interface. I need to test that the system under test calls at least one of the three methods. I don't care how many times, or with what arguments it does call, but the case where it ignores all the methods and does not touch the IFoo mock is the failure case. I've been looking through the Expect.Call documentation but can't see an easy way to do it. Any ideas?
0
53,670
09/10/2008 09:10:59
3,205
08/27/2008 13:06:13
456
29
How to efficiently SQL select neweset entries from a MySQL database?
I have a database containing stock price history. I want to select most recent prices for every stock that is listed. I know PostreSQL has a <a href="http://stackoverflow.com/questions/25224/joining-latest-of-various-usermetadata-tags-to-user-rows#27159">DISTINCT ON</a> statement that would suit ideally here. Table columns are `name`, `closingPrice` and `date`; `name` and `date` together form a unique index. The _easiest_ (and very uneffective) way is SELECT * FROM stockPrices s WHERE s.date = (SELECT MAX(date) FROM stockPrices si WHERE si.name = s.name); Much better approach I found is SELECT * FROM stockPrices s JOIN (SELECT name, MAX(date) AS date FROM stockPrices si GROUP BY name) lastEntry ON s.name = lastEntry.name AND s.date = lastEntry.date; What would be an efficient way to do this? What indexes should I create?
sql
mysql
null
null
null
null
open
How to efficiently SQL select neweset entries from a MySQL database? === I have a database containing stock price history. I want to select most recent prices for every stock that is listed. I know PostreSQL has a <a href="http://stackoverflow.com/questions/25224/joining-latest-of-various-usermetadata-tags-to-user-rows#27159">DISTINCT ON</a> statement that would suit ideally here. Table columns are `name`, `closingPrice` and `date`; `name` and `date` together form a unique index. The _easiest_ (and very uneffective) way is SELECT * FROM stockPrices s WHERE s.date = (SELECT MAX(date) FROM stockPrices si WHERE si.name = s.name); Much better approach I found is SELECT * FROM stockPrices s JOIN (SELECT name, MAX(date) AS date FROM stockPrices si GROUP BY name) lastEntry ON s.name = lastEntry.name AND s.date = lastEntry.date; What would be an efficient way to do this? What indexes should I create?
0
53,676
09/10/2008 09:14:47
5,351
09/09/2008 10:19:17
11
3
How to resolve ORA-011033: ORACLE initialization or shutdown in progress
When trying to connect to an ORACLE user via TOAD (Quest Software) or any other means (Oracle Enterprise Manager) I simply get the error: > ORA-011033: ORACLE initialization or > shutdown in progress ---------- [in the spirit of StackOverflow I will answer this one myself - at least I'll relate how I resolved it in my case - please also relate your own such adventures...]
database
oracle
null
null
null
null
open
How to resolve ORA-011033: ORACLE initialization or shutdown in progress === When trying to connect to an ORACLE user via TOAD (Quest Software) or any other means (Oracle Enterprise Manager) I simply get the error: > ORA-011033: ORACLE initialization or > shutdown in progress ---------- [in the spirit of StackOverflow I will answer this one myself - at least I'll relate how I resolved it in my case - please also relate your own such adventures...]
0
53,693
09/10/2008 09:26:58
2,041
08/19/2008 23:02:38
145
12
Amazon SimpleDB
Has anyone considered using something along the lines of the Amazon SimpleDB data store as their backend database? SQL Server hosting (at least in the UK) is expensive so could something like this along with cloud file storage (S3) be used for building apps that could grow with your application. Great in theory but would anyone consider using it. In fact is anyone actually using it now for real production software as I would love to read your comments. Cheers, John
amazon
amazon-s3
amazon-simpledb
null
null
null
open
Amazon SimpleDB === Has anyone considered using something along the lines of the Amazon SimpleDB data store as their backend database? SQL Server hosting (at least in the UK) is expensive so could something like this along with cloud file storage (S3) be used for building apps that could grow with your application. Great in theory but would anyone consider using it. In fact is anyone actually using it now for real production software as I would love to read your comments. Cheers, John
0
10,424,320
05/03/2012 02:29:28
453,513
09/21/2010 05:46:53
773
33
Credentials.acquireTGTFromCache(null, null) returns null using jre 7
I'm admittedly unfamiliar with the JAAS API, but need to help out with investigation with a problem we encountered while upgrading to jre 7. Apps that used to be able to auto-login using the currently logged on Windows users name stops working. After some poking around, it comes to this line of code. sun.security.krb5.Credentials.Credentials.acquireTGTFromCache(null, null); This returns null when using a jre 7 jvm, but returns the correct crendentials when using jre 6. I wrote a test class in its simplest form and still see the same behavior, so it cannot have been due to the code in our own classes. package test; import sun.security.krb5.Credentials; public class Scratch { public static void main(final String args[]) throws Exception { final Credentials yaoza = Credentials.acquireTGTFromCache(null, null); System.out.println(yaoza); } } Could this be some kind of configuration problems? Any answer or a pointer to the right direction would be greatly appreciated. Thank you!
java
kerberos
jaas
jdk7
null
null
open
Credentials.acquireTGTFromCache(null, null) returns null using jre 7 === I'm admittedly unfamiliar with the JAAS API, but need to help out with investigation with a problem we encountered while upgrading to jre 7. Apps that used to be able to auto-login using the currently logged on Windows users name stops working. After some poking around, it comes to this line of code. sun.security.krb5.Credentials.Credentials.acquireTGTFromCache(null, null); This returns null when using a jre 7 jvm, but returns the correct crendentials when using jre 6. I wrote a test class in its simplest form and still see the same behavior, so it cannot have been due to the code in our own classes. package test; import sun.security.krb5.Credentials; public class Scratch { public static void main(final String args[]) throws Exception { final Credentials yaoza = Credentials.acquireTGTFromCache(null, null); System.out.println(yaoza); } } Could this be some kind of configuration problems? Any answer or a pointer to the right direction would be greatly appreciated. Thank you!
0
10,424,334
05/03/2012 02:31:47
1,371,395
05/03/2012 02:04:38
1
0
Encryption in .NET and decryption in Android throws BadPaddingException: pad block corrupted
I did lot of research but i couldn't find answer to my issue. I'm doing AES encryption (Rijndael block size 128 bits) in .NET and decryption in Android (AES) with same password, salt & IV between them. C# Encryption code snippet: byte[] initVectorBytes = Encoding.ASCII.GetBytes(initVector); byte[] saltValueBytes = Encoding.ASCII.GetBytes(saltValue); byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText); PasswordDeriveBytes password = new PasswordDeriveBytes( passPhrase, saltValueBytes, hashAlgorithm, passwordIterations); byte[] keyBytes = password.GetBytes(keySize / 8); RijndaelManaged symmetricKey = new RijndaelManaged(); symmetricKey.Padding = PaddingMode.PKCS7; symmetricKey.BlockSize = 128; symmetricKey.Mode = CipherMode.CBC; ICryptoTransform encryptor = symmetricKey.CreateEncryptor( keyBytes, initVectorBytes); MemoryStream memoryStream = new MemoryStream(); CryptoStream cryptoStream = new CryptoStream(memoryStream, encryptor, CryptoStreamMode.Write); cryptoStream.Write(plainTextBytes, 0, plainTextBytes.Length); cryptoStream.FlushFinalBlock(); byte[] cipherTextBytes = memoryStream.ToArray(); memoryStream.Close(); cryptoStream.Close(); string cipherText = Convert.ToBase64String(cipherTextBytes); Android Decryption code snippet: KeySpec keySpec = new PBEKeySpec(password.toCharArray(), salt.getBytes(), iterationCount); SecretKey key = SecretKeyFactory.getInstance( "PBEWithSHA1And128BitAES-CBC-BC").generateSecret(keySpec); Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding", "BC"); cipher.init(Cipher.DECRYPT_MODE, key, new IvParameterSpec(iv.getBytes())); byte[] decrypted = cipher.doFinal(encrypted); cipher.doFinal call throws following exception. "05-02 18:17:38.239: W/System.err(25547): javax.crypto.BadPaddingException: pad block corrupted" I did set the padding to "PKCS7Padding" in both .NET and Android and the encryption block size to 128 bits. However, encrypt in Android & decrypt in Android works fine. Same with Encrypt in .NET and Decrypt in .NET works fine too. Sample Test: String PlainText = "hello world"; String EncryptedDotNetblob = "JyijoGEALMI25Zej7d+fMg=="; String EncryptedAndroidblob = "1HhuTQaLRJEK4zxI9FAO6A=="; as you can see above blobs are different too. Anyone knows what's the problem here?
android
.net
aes
rijndaelmanaged
null
null
open
Encryption in .NET and decryption in Android throws BadPaddingException: pad block corrupted === I did lot of research but i couldn't find answer to my issue. I'm doing AES encryption (Rijndael block size 128 bits) in .NET and decryption in Android (AES) with same password, salt & IV between them. C# Encryption code snippet: byte[] initVectorBytes = Encoding.ASCII.GetBytes(initVector); byte[] saltValueBytes = Encoding.ASCII.GetBytes(saltValue); byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText); PasswordDeriveBytes password = new PasswordDeriveBytes( passPhrase, saltValueBytes, hashAlgorithm, passwordIterations); byte[] keyBytes = password.GetBytes(keySize / 8); RijndaelManaged symmetricKey = new RijndaelManaged(); symmetricKey.Padding = PaddingMode.PKCS7; symmetricKey.BlockSize = 128; symmetricKey.Mode = CipherMode.CBC; ICryptoTransform encryptor = symmetricKey.CreateEncryptor( keyBytes, initVectorBytes); MemoryStream memoryStream = new MemoryStream(); CryptoStream cryptoStream = new CryptoStream(memoryStream, encryptor, CryptoStreamMode.Write); cryptoStream.Write(plainTextBytes, 0, plainTextBytes.Length); cryptoStream.FlushFinalBlock(); byte[] cipherTextBytes = memoryStream.ToArray(); memoryStream.Close(); cryptoStream.Close(); string cipherText = Convert.ToBase64String(cipherTextBytes); Android Decryption code snippet: KeySpec keySpec = new PBEKeySpec(password.toCharArray(), salt.getBytes(), iterationCount); SecretKey key = SecretKeyFactory.getInstance( "PBEWithSHA1And128BitAES-CBC-BC").generateSecret(keySpec); Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding", "BC"); cipher.init(Cipher.DECRYPT_MODE, key, new IvParameterSpec(iv.getBytes())); byte[] decrypted = cipher.doFinal(encrypted); cipher.doFinal call throws following exception. "05-02 18:17:38.239: W/System.err(25547): javax.crypto.BadPaddingException: pad block corrupted" I did set the padding to "PKCS7Padding" in both .NET and Android and the encryption block size to 128 bits. However, encrypt in Android & decrypt in Android works fine. Same with Encrypt in .NET and Decrypt in .NET works fine too. Sample Test: String PlainText = "hello world"; String EncryptedDotNetblob = "JyijoGEALMI25Zej7d+fMg=="; String EncryptedAndroidblob = "1HhuTQaLRJEK4zxI9FAO6A=="; as you can see above blobs are different too. Anyone knows what's the problem here?
0
10,424,335
05/03/2012 02:31:50
1,371,402
05/03/2012 02:11:47
1
0
PHP - Convert multidimensional array to 2D array with dot notation keys
There are plenty of tips and code examples out there of accessing PHP arrays with dot notation, but I would like to do somewhat the opposite. I would like to take a multidimensional array like this: $myArray = array( 'key1' => 'value1', 'key2' => array( 'subkey' => 'subkeyval' ), 'key3' => 'value3', 'key4' => array( 'subkey4' => array( 'subsubkey4' => 'subsubkeyval4', 'subsubkey5' => 'subsubkeyval5', ), 'subkey5' => 'subkeyval5' ) ); And turn it into this (likely through some recursive function): $newArray = array( 'key1' => 'value1', 'key2.subkey' => 'subkeyval', 'key3' => 'value3', 'key4.subkey4.subsubkey4' => 'subsubkeyval4', 'key4.subkey5.subsubkey5' => 'subsubkeyval5', 'key4.subkey5' => 'subkeyval5' );
php
arrays
null
null
null
null
open
PHP - Convert multidimensional array to 2D array with dot notation keys === There are plenty of tips and code examples out there of accessing PHP arrays with dot notation, but I would like to do somewhat the opposite. I would like to take a multidimensional array like this: $myArray = array( 'key1' => 'value1', 'key2' => array( 'subkey' => 'subkeyval' ), 'key3' => 'value3', 'key4' => array( 'subkey4' => array( 'subsubkey4' => 'subsubkeyval4', 'subsubkey5' => 'subsubkeyval5', ), 'subkey5' => 'subkeyval5' ) ); And turn it into this (likely through some recursive function): $newArray = array( 'key1' => 'value1', 'key2.subkey' => 'subkeyval', 'key3' => 'value3', 'key4.subkey4.subsubkey4' => 'subsubkeyval4', 'key4.subkey5.subsubkey5' => 'subsubkeyval5', 'key4.subkey5' => 'subkeyval5' );
0
10,424,340
05/03/2012 02:32:41
945,216
09/14/2011 17:40:42
38
0
subst for-loop element in makefile?
Suppose my Makefile is as following: FILES = hello.py PHONY: hi hi: -@for file in $(FILES); do \ (echo $$file; \ echo $(subst py,xml,$$file); \ echo $(subst py,xml,hello.py)); \ done When make is called, the following will be printed: hello.py hello.py hello.xml May I know why echo $(subst py,xml,$$file); doesn't work the way I want it to (echoing hello.xml instead of hello.ph)? Also, would you please let me know if you have any suggestions as to how I could modify this for-loop element?
makefile
make
null
null
null
null
open
subst for-loop element in makefile? === Suppose my Makefile is as following: FILES = hello.py PHONY: hi hi: -@for file in $(FILES); do \ (echo $$file; \ echo $(subst py,xml,$$file); \ echo $(subst py,xml,hello.py)); \ done When make is called, the following will be printed: hello.py hello.py hello.xml May I know why echo $(subst py,xml,$$file); doesn't work the way I want it to (echoing hello.xml instead of hello.ph)? Also, would you please let me know if you have any suggestions as to how I could modify this for-loop element?
0
10,424,343
05/03/2012 02:32:46
1,355,240
04/25/2012 04:26:49
1
0
How do I print out a method within a loop
I apologize but I am new to programming and I'm having difficulty coding a program. The original program is as follows: import java.io.*; import java.io.IOException; import java.io.InputStreamReader; class buildABoat{ String boatName; // Boat name void buildABoat(){ String BoatName; } void nameTheBoat() { try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("\n\nWhat should we name this vessel? \n\n"); this.boatName = br.readLine(); System.out.println("\n\nThe " + boatName + " is ready to sail!\n"); } catch (IOException e) { } } } class proj1{ public static void main(String[] arg){ buildABoat boat1; buildABoat boat2; buildABoat boat3; buildABoat boat4; buildABoat boat5; boat1 = new buildABoat(); boat2 = new buildABoat(); boat3 = new buildABoat(); boat4 = new buildABoat(); boat5 = new buildABoat(); boat1.nameTheBoat(); boat2.nameTheBoat(); boat3.nameTheBoat(); boat4.nameTheBoat(); boat5.nameTheBoat(); System.out.println("(Press ENTER to exit)"); try { System.in.read(); } catch (IOException e) { return; } } } This produces the following: **What should we name this vessel? Enterprise The Enterprise is ready to sail! What should we name this vessel? Columbia The Columbia is ready to sail! What should we name this vessel? Challenger The Challenger is ready to sail! What should we name this vessel? Atlantis The Atlantis is ready to sail! What should we name this vessel? Endeavor The Endeavor is ready to sail! (Press ENTER to exit)** I tried to change this to the following: import java.io.*; import java.io.IOException; import java.io.InputStreamReader; class buildABoat{ String boatName; // Boat name void buildABoat(){ String BoatName; } void nameTheBoat() { try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("\n\nWhat should we name this vessel? \n\n"); this.boatName = br.readLine(); System.out.println("\n\nThe " + boatName + " is ready to sail!\n"); } catch (IOException e) { } } } class proj1{ public static void main(String[] arg){ Boat[] boat; boat = new Boat[5]; for(int i = 0; i <= Boat.Length; i++){ nameTheBoat(); } System.out.println("(Press ENTER to exit)"); try { System.in.read(); } catch (IOException e) { return; } } } This of course produces the following error: **proj1.java:71: error: cannot find symbol for(int i = 0; i <= Boat.Length; i++){ ^ symbol: variable Length location: class Boat proj1.java:73: error: cannot find symbol nameTheBoat(); ^ symbol: method nameTheBoat() location: class proj1 2 errors** What am I missing in the new program? Sorry for the length but I am new to programming. Thanks, Joe
java
arrays
methods
null
null
null
open
How do I print out a method within a loop === I apologize but I am new to programming and I'm having difficulty coding a program. The original program is as follows: import java.io.*; import java.io.IOException; import java.io.InputStreamReader; class buildABoat{ String boatName; // Boat name void buildABoat(){ String BoatName; } void nameTheBoat() { try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("\n\nWhat should we name this vessel? \n\n"); this.boatName = br.readLine(); System.out.println("\n\nThe " + boatName + " is ready to sail!\n"); } catch (IOException e) { } } } class proj1{ public static void main(String[] arg){ buildABoat boat1; buildABoat boat2; buildABoat boat3; buildABoat boat4; buildABoat boat5; boat1 = new buildABoat(); boat2 = new buildABoat(); boat3 = new buildABoat(); boat4 = new buildABoat(); boat5 = new buildABoat(); boat1.nameTheBoat(); boat2.nameTheBoat(); boat3.nameTheBoat(); boat4.nameTheBoat(); boat5.nameTheBoat(); System.out.println("(Press ENTER to exit)"); try { System.in.read(); } catch (IOException e) { return; } } } This produces the following: **What should we name this vessel? Enterprise The Enterprise is ready to sail! What should we name this vessel? Columbia The Columbia is ready to sail! What should we name this vessel? Challenger The Challenger is ready to sail! What should we name this vessel? Atlantis The Atlantis is ready to sail! What should we name this vessel? Endeavor The Endeavor is ready to sail! (Press ENTER to exit)** I tried to change this to the following: import java.io.*; import java.io.IOException; import java.io.InputStreamReader; class buildABoat{ String boatName; // Boat name void buildABoat(){ String BoatName; } void nameTheBoat() { try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("\n\nWhat should we name this vessel? \n\n"); this.boatName = br.readLine(); System.out.println("\n\nThe " + boatName + " is ready to sail!\n"); } catch (IOException e) { } } } class proj1{ public static void main(String[] arg){ Boat[] boat; boat = new Boat[5]; for(int i = 0; i <= Boat.Length; i++){ nameTheBoat(); } System.out.println("(Press ENTER to exit)"); try { System.in.read(); } catch (IOException e) { return; } } } This of course produces the following error: **proj1.java:71: error: cannot find symbol for(int i = 0; i <= Boat.Length; i++){ ^ symbol: variable Length location: class Boat proj1.java:73: error: cannot find symbol nameTheBoat(); ^ symbol: method nameTheBoat() location: class proj1 2 errors** What am I missing in the new program? Sorry for the length but I am new to programming. Thanks, Joe
0
53,705
09/10/2008 09:39:22
4,496
09/04/2008 08:16:51
70
6
Creating MP4/M4A files with Chapter marks
I am trying to join together several audio files into one mp4/m4a file containing chapter metadata. I am currently using QTKit to do this but unfortunately when QTKit exports to m4a format the metadata is all stripped out (this has been confirmed as a bug by Apple) see [sample code](http://files.shinydevelopment.com/audiojoiner.zip). I think this rules QTKit out for this job, but would be happy to be proven wrong as it is a really neat API for it if it worked. So, I am looking for a way to concatenate audio files (input format does not really matter as I can do conversion) into an m4a file with chapters metadata. As an alternative to code, I am open to the idea of using an existing command line tool to accomplish this as long as it is redistributable as part of another application. Any ideas?
osx
objectivec
cocoa
audio
quicktime
null
open
Creating MP4/M4A files with Chapter marks === I am trying to join together several audio files into one mp4/m4a file containing chapter metadata. I am currently using QTKit to do this but unfortunately when QTKit exports to m4a format the metadata is all stripped out (this has been confirmed as a bug by Apple) see [sample code](http://files.shinydevelopment.com/audiojoiner.zip). I think this rules QTKit out for this job, but would be happy to be proven wrong as it is a really neat API for it if it worked. So, I am looking for a way to concatenate audio files (input format does not really matter as I can do conversion) into an m4a file with chapters metadata. As an alternative to code, I am open to the idea of using an existing command line tool to accomplish this as long as it is redistributable as part of another application. Any ideas?
0
53,715
09/10/2008 09:48:34
2,098
08/20/2008 11:21:16
328
22
Does Delphi call inherited on overridden procedures if there is no explicit call
Does Delphi call inherited on overridden procedures if there is no explicit call in the code ie (inherited;), I have the following structure (from super to sub class) TForm >> TBaseForm >> TAnyOtherForm All the forms in the project will be derived from TBaseForm, as this will have all the standard set-up and destructive parts that are used for every form (security, validation ect). TBaseForm has onCreate and onDestroy procedures with the code to do this, but if someone (ie me) forgot to add inherited to the onCreate on TAnyOtherForm would Delphi call it for me? I have found references on the web that say it is not required, but nowhere says if it gets called if it is omitted from the code. Also if it does call inherited for me, when will it call it?
delphi
oop
inheritance
null
null
null
open
Does Delphi call inherited on overridden procedures if there is no explicit call === Does Delphi call inherited on overridden procedures if there is no explicit call in the code ie (inherited;), I have the following structure (from super to sub class) TForm >> TBaseForm >> TAnyOtherForm All the forms in the project will be derived from TBaseForm, as this will have all the standard set-up and destructive parts that are used for every form (security, validation ect). TBaseForm has onCreate and onDestroy procedures with the code to do this, but if someone (ie me) forgot to add inherited to the onCreate on TAnyOtherForm would Delphi call it for me? I have found references on the web that say it is not required, but nowhere says if it gets called if it is omitted from the code. Also if it does call inherited for me, when will it call it?
0
53,717
09/10/2008 09:49:18
3,201
08/27/2008 12:58:34
487
37
Managing customer expectations at prototype stage
Why is it that customers are seemingly **always** eager to believe that presenting a few mockup online screens means that the application is just a few tweaks away from being shipped? Ok, I realise the answer lies in the fact that they don't understand the work that has to go on behind the screens to actually *provide the necessary functionality* - I can understand that, and full accept that it's crucial that we ensure they are realistic about project timelines. My question is... What are the most effective techniques you've successfully utilised to best manage customer expectations at the early prototype/demo stage? (apart from banning the marketing folk from the room ;-)) Thanks
project-management
management
customer
null
null
null
open
Managing customer expectations at prototype stage === Why is it that customers are seemingly **always** eager to believe that presenting a few mockup online screens means that the application is just a few tweaks away from being shipped? Ok, I realise the answer lies in the fact that they don't understand the work that has to go on behind the screens to actually *provide the necessary functionality* - I can understand that, and full accept that it's crucial that we ensure they are realistic about project timelines. My question is... What are the most effective techniques you've successfully utilised to best manage customer expectations at the early prototype/demo stage? (apart from banning the marketing folk from the room ;-)) Thanks
0
53,719
09/10/2008 09:50:49
5,085
09/07/2008 19:09:10
58
5
Hiding data points in Excel line charts
It is obviously possible to hide individual data points in an Excel line chart. - Select a data point. - Right click -> Format Data Point... - Select Patterns - Tab Set Line to None How do you accomplish the same thing in VBA? Intuition tells me there should be a property on the [Point object][1] (Chart.SeriesCollection(<index>).Points(<index>)) which deals with this... [1]: http://msdn.microsoft.com/en-us/library/aa174283(office.11).aspx
excel
vba
charts
null
null
null
open
Hiding data points in Excel line charts === It is obviously possible to hide individual data points in an Excel line chart. - Select a data point. - Right click -> Format Data Point... - Select Patterns - Tab Set Line to None How do you accomplish the same thing in VBA? Intuition tells me there should be a property on the [Point object][1] (Chart.SeriesCollection(<index>).Points(<index>)) which deals with this... [1]: http://msdn.microsoft.com/en-us/library/aa174283(office.11).aspx
0
53,728
09/10/2008 10:03:08
184
08/03/2008 05:34:19
2,270
37
Will HTML Encoding prevent all kinds of XSS attacks?
I am not concerned about other kinds of attacks. Just want to know whether HTML Encode can prevent all kinds of XSS attacks. Is there some way to do an XSS attack even if HTML Encode is used?
security
xss
html-encode
null
null
null
open
Will HTML Encoding prevent all kinds of XSS attacks? === I am not concerned about other kinds of attacks. Just want to know whether HTML Encode can prevent all kinds of XSS attacks. Is there some way to do an XSS attack even if HTML Encode is used?
0
53,734
09/10/2008 10:08:05
1,030
08/11/2008 15:40:52
330
26
Best use of indices on temporary tables in T-SQL
If you're creating a temporary table within a stored procedure and want to add an index or two on it, to improve the performance of any additional statements made against it, what is the best approach? Sybase says [this][1]: _"the table must contain data when the index is created. If you create the temporary table and create the index on an empty table, Adaptive Server does not create column statistics such as histograms and densities. If you insert data rows after creating the index, the optimizer has incomplete statistics."_ but recently a colleague mentioned that if I create the temp table and indices in a different stored procedure to the one which actually uses the temporary table, then Adaptive Server optimiser _will_ be able to make use of them. On the whole, I'm not a big fan of wrapper procedures that add little value, so I've not actually got around to testing this, but I thought I'd put the question out there, to see if anyone had any other approaches or advice? [1]: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc20020_1251/html/databases/databases644.htm
tsql
indexing
sybase
temporarytables
null
null
open
Best use of indices on temporary tables in T-SQL === If you're creating a temporary table within a stored procedure and want to add an index or two on it, to improve the performance of any additional statements made against it, what is the best approach? Sybase says [this][1]: _"the table must contain data when the index is created. If you create the temporary table and create the index on an empty table, Adaptive Server does not create column statistics such as histograms and densities. If you insert data rows after creating the index, the optimizer has incomplete statistics."_ but recently a colleague mentioned that if I create the temp table and indices in a different stored procedure to the one which actually uses the temporary table, then Adaptive Server optimiser _will_ be able to make use of them. On the whole, I'm not a big fan of wrapper procedures that add little value, so I've not actually got around to testing this, but I thought I'd put the question out there, to see if anyone had any other approaches or advice? [1]: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc20020_1251/html/databases/databases644.htm
0
53,738
09/10/2008 10:13:40
4,021
09/01/2008 12:23:44
148
12
How do you test the performance of a website?
Are there specific tools to perform the following job or there is a suite of tools that help me do the following: How can I check page load times? How can I track down a page that hogs memory? How can I track a page that consumes a lot of CPU cycles? I just want to glean from the experience of this forum and come across a holistic view of tools.
website-performance
null
null
null
null
null
open
How do you test the performance of a website? === Are there specific tools to perform the following job or there is a suite of tools that help me do the following: How can I check page load times? How can I track down a page that hogs memory? How can I track a page that consumes a lot of CPU cycles? I just want to glean from the experience of this forum and come across a holistic view of tools.
0
53,744
09/10/2008 10:18:40
2,138
08/20/2008 14:23:45
115
9
How to escape a # in velocity
I would like to know how can i escape a # in velocity. Backslash seems to escape it but it prints itself as well This: \#\# prints: \#\# I would like: ##
velocity
null
null
null
null
null
open
How to escape a # in velocity === I would like to know how can i escape a # in velocity. Backslash seems to escape it but it prints itself as well This: \#\# prints: \#\# I would like: ##
0
53,757
09/10/2008 10:44:33
3,137
08/26/2008 23:31:53
56
8
Which compiles to faster code: "n * 3" or "n+(n*2)"?
Which compiles to faster code: "ans = n * 3" or "ans = n+(n*2)"? Assuming that n is either an int or a long, and it is is running on a modern Win32 Intel box. Would this be different if there was some dereferencing involved, that is, which of these would be faster? <pre> long a; long *pn; long ans; ... *pn = some_number; ans = *pn * 3; </pre> Or <pre> ans = *pn+(*pn*2); </pre> Or, is it something one need not worry about as optimizing compilers are likely to account for this in any case?
c++
c
null
null
null
null
open
Which compiles to faster code: "n * 3" or "n+(n*2)"? === Which compiles to faster code: "ans = n * 3" or "ans = n+(n*2)"? Assuming that n is either an int or a long, and it is is running on a modern Win32 Intel box. Would this be different if there was some dereferencing involved, that is, which of these would be faster? <pre> long a; long *pn; long ans; ... *pn = some_number; ans = *pn * 3; </pre> Or <pre> ans = *pn+(*pn*2); </pre> Or, is it something one need not worry about as optimizing compilers are likely to account for this in any case?
0
53,766
09/10/2008 10:51:57
2,387
08/22/2008 00:37:24
86
8
Daily Build
OK, so we all know the daily build is the heart beat of a project, but whats the single best way of automating it? We have perl scripts wrapping our pipeline which includes ClearCase, VS2005 (C++), Intel FORTRAN, Inno setup. We use cron jobs on UNIX to schedule the build, and host a simple Apache web server to view and monitor the build. All in all its rather complex, I would like to know whats the best off the shelf solution that people use? And yes I did say FORTRAN no escaping it sometimes, it works, no point doing a huge re-implementation project for some tried and tested FEA code that just works.
build
dailybuilds
null
null
null
null
open
Daily Build === OK, so we all know the daily build is the heart beat of a project, but whats the single best way of automating it? We have perl scripts wrapping our pipeline which includes ClearCase, VS2005 (C++), Intel FORTRAN, Inno setup. We use cron jobs on UNIX to schedule the build, and host a simple Apache web server to view and monitor the build. All in all its rather complex, I would like to know whats the best off the shelf solution that people use? And yes I did say FORTRAN no escaping it sometimes, it works, no point doing a huge re-implementation project for some tried and tested FEA code that just works.
0
53,786
09/10/2008 11:16:30
5,357
09/09/2008 10:33:23
41
11
How do i generate a histogram for a given probability distribution (for load testing a server)
I am trying to automate load testing of a server using a realistic frequency distribution of requests. I've chosen the [Weibull][1] distribution as it "sort of" matches the distribution I've observed (ramps up quickly, drops off quickly but not instantly) I use this distribution to generate the number of requests that should be sent each day between a given start and end date I've hacked together an algorithm in Python that sort of works but it feels kludgy: how_many_days = (end_date - start_date).days freqs = defaultdict(int) for x in xrange(how_many_responses): freqs[int(how_many_days * weibullvariate(0.5, 2))] += 1 timeline = [] day = start_date for i,freq in sorted(freqs.iteritems()): timeline.append((day, freq)) day += timedelta(days=1) return timeline Is there a better way to do this? [1]: http://en.wikipedia.org/wiki/Weibull_distribution
python
statistics
load
testing
null
null
open
How do i generate a histogram for a given probability distribution (for load testing a server) === I am trying to automate load testing of a server using a realistic frequency distribution of requests. I've chosen the [Weibull][1] distribution as it "sort of" matches the distribution I've observed (ramps up quickly, drops off quickly but not instantly) I use this distribution to generate the number of requests that should be sent each day between a given start and end date I've hacked together an algorithm in Python that sort of works but it feels kludgy: how_many_days = (end_date - start_date).days freqs = defaultdict(int) for x in xrange(how_many_responses): freqs[int(how_many_days * weibullvariate(0.5, 2))] += 1 timeline = [] day = start_date for i,freq in sorted(freqs.iteritems()): timeline.append((day, freq)) day += timedelta(days=1) return timeline Is there a better way to do this? [1]: http://en.wikipedia.org/wiki/Weibull_distribution
0
53,796
09/10/2008 11:29:13
5,427
09/09/2008 14:21:27
26
2
Is WindowsFormsHost fit for purpose (.net WPF hosting WinForms)?
A GUI driven application needs to host some prebuilt WinForms based components. These components provide high performance interactive views using a mixture of GDI+ and DirectX. The views handle control input and display custom graphical renderings. The components are tested in a WinForms harness by the supplier. Can a commericial application use WPF for its GUI and rely on [WindowsFormsHost][1] to host the WinForms components or have you experience of technical glitches e.g. input lags, update issues that would make you cautious? [1]: http://msdn.microsoft.com/en-us/library/system.windows.forms.integration.windowsformshost.aspx "WindowsFormsHost"
.net
winforms
wpf
null
null
null
open
Is WindowsFormsHost fit for purpose (.net WPF hosting WinForms)? === A GUI driven application needs to host some prebuilt WinForms based components. These components provide high performance interactive views using a mixture of GDI+ and DirectX. The views handle control input and display custom graphical renderings. The components are tested in a WinForms harness by the supplier. Can a commericial application use WPF for its GUI and rely on [WindowsFormsHost][1] to host the WinForms components or have you experience of technical glitches e.g. input lags, update issues that would make you cautious? [1]: http://msdn.microsoft.com/en-us/library/system.windows.forms.integration.windowsformshost.aspx "WindowsFormsHost"
0
53,802
09/10/2008 11:33:53
20
08/01/2008 12:09:11
333
19
What is the best tool or utility to benchmark my JavaScript/.
I'm currently working on a JavaScript tool that, during the course of its execution, will ultimately traverse each node in the DOM. Because this has potential to be a very expensive task, I'd like to benchmark the performance of this script. What's the best, free tool for benchmarking a script such as this across the major browsers? Ideally, I'd like to tool (or set of tools, even): <ul> <li> To generate some form of report based on the results of the test. It can be as simple as a table showing execution times, or as complex as generating some form of chart. Either way is fine. </li> <li> To be free - it's not that I don't believe in paying for software, it's just that I don't have a major need for a tool like this in my typical day-to-day tasks. </li> </ul> If possible, I'd also like the tool to generate varying levels of complex pages so that I can stress test a set of DOMs. This isn't a necessity - if I need to do so, I can write one myself; however, I'd figure I'd poll the community first to see if something already exists.
javascript
dom
traversal
null
null
null
open
What is the best tool or utility to benchmark my JavaScript/. === I'm currently working on a JavaScript tool that, during the course of its execution, will ultimately traverse each node in the DOM. Because this has potential to be a very expensive task, I'd like to benchmark the performance of this script. What's the best, free tool for benchmarking a script such as this across the major browsers? Ideally, I'd like to tool (or set of tools, even): <ul> <li> To generate some form of report based on the results of the test. It can be as simple as a table showing execution times, or as complex as generating some form of chart. Either way is fine. </li> <li> To be free - it's not that I don't believe in paying for software, it's just that I don't have a major need for a tool like this in my typical day-to-day tasks. </li> </ul> If possible, I'd also like the tool to generate varying levels of complex pages so that I can stress test a set of DOMs. This isn't a necessity - if I need to do so, I can write one myself; however, I'd figure I'd poll the community first to see if something already exists.
0
53,803
09/10/2008 11:34:45
5,517
09/10/2008 08:17:12
1
0
Can I turn off automatic merging in Subversion?
We're looking at moving from a check-out/edit/check-in style of version control system to Subversion, and during the evaluation we discovered that when you perform an Update action in TortoiseSVN (and presumably in any Subversion client?), if changes in the repository that need to be applied to files that you've been editing don't cause any conflicts then they'll be automatically/silently merged. This scares us a little, as it's possible that this merge, while not producing any compile errors, could at least introduce some logic errors that may not be easily detected. Very simple example: I'm working within a C# method changing some logic in the latter-part of the method, and somebody else changes the value that a variable gets initialised to at the start of the method. The other person's change isn't in the lines of code that I'm working on so there won't be a conflict; but it's possible to dramatically change the output of the method. What we were hoping the situation would be is that if a merge needs to occur, then the two files would be shown and at least a simple accept/reject change option be presented, so that at least we're aware that something has changed and are given the option to see if it impacts our code. Is there a way to do this with Subversion/TortoiseSVN? Or are we stuck in our present working ways too much and should just let it do it's thing...
tortoisesvn
subversion
null
null
null
null
open
Can I turn off automatic merging in Subversion? === We're looking at moving from a check-out/edit/check-in style of version control system to Subversion, and during the evaluation we discovered that when you perform an Update action in TortoiseSVN (and presumably in any Subversion client?), if changes in the repository that need to be applied to files that you've been editing don't cause any conflicts then they'll be automatically/silently merged. This scares us a little, as it's possible that this merge, while not producing any compile errors, could at least introduce some logic errors that may not be easily detected. Very simple example: I'm working within a C# method changing some logic in the latter-part of the method, and somebody else changes the value that a variable gets initialised to at the start of the method. The other person's change isn't in the lines of code that I'm working on so there won't be a conflict; but it's possible to dramatically change the output of the method. What we were hoping the situation would be is that if a merge needs to occur, then the two files would be shown and at least a simple accept/reject change option be presented, so that at least we're aware that something has changed and are given the option to see if it impacts our code. Is there a way to do this with Subversion/TortoiseSVN? Or are we stuck in our present working ways too much and should just let it do it's thing...
0
53,806
09/10/2008 11:39:50
4,474
09/04/2008 01:17:32
1
4
Reintroducing functions in Delphi
Does anyone know what the motivation was for having the reintroduce keyword in Delphi? If you have a child class that contains a function with the same name as a virtual function in the parent class and it is not declared with the override modifier then it is a compile error. Adding the reintroduce modifier in such situations fixes the error but I have never grasped the reasoning for the compile error.
delphi
null
null
null
null
null
open
Reintroducing functions in Delphi === Does anyone know what the motivation was for having the reintroduce keyword in Delphi? If you have a child class that contains a function with the same name as a virtual function in the parent class and it is not declared with the override modifier then it is a compile error. Adding the reintroduce modifier in such situations fixes the error but I have never grasped the reasoning for the compile error.
0
53,807
09/10/2008 11:41:01
572
08/06/2008 20:56:54
3,376
263
Can you do "builds" with PHP scripts or an interpreted language?
Correct me if I'm wrong, but a "build" is a "compile", and not every language compiles. Continuous Integration involves building components to see if they continue to work beyond unit tests, which I might be oversimplifying. But if your project involves a language that does not compile, how do you perform nightly builds or use continuous integration techniques?
build-process
continuous-integration
interpreted-language
null
null
null
open
Can you do "builds" with PHP scripts or an interpreted language? === Correct me if I'm wrong, but a "build" is a "compile", and not every language compiles. Continuous Integration involves building components to see if they continue to work beyond unit tests, which I might be oversimplifying. But if your project involves a language that does not compile, how do you perform nightly builds or use continuous integration techniques?
0
53,808
09/10/2008 11:41:06
3,637
08/29/2008 16:14:15
21
2
Good 15 minute Java question to ask recent college graduate
When interviewing college coops/interns or recent graduates it helps to have a Java programming question that they can do on a white board in 15 minutes. Does anyone have examples of good questions like this? A C++ question I was once asked in an interview was to write a string to integer function which is along the lines of the level of question I am looking for examples of.
java
interview-questions
null
null
null
null
open
Good 15 minute Java question to ask recent college graduate === When interviewing college coops/interns or recent graduates it helps to have a Java programming question that they can do on a white board in 15 minutes. Does anyone have examples of good questions like this? A C++ question I was once asked in an interview was to write a string to integer function which is along the lines of the level of question I am looking for examples of.
0
53,811
09/10/2008 11:41:42
4,086
09/01/2008 18:01:18
74
17
How do you normally set up your compiler's optimization settings?
Do you normally set your compiler to optimize for maximum speed or smallest code size? or do you manually configure individual optimization settings? Why? I notice most of the time people tend to just leave compiler optimization settings to their default state, which with visual c++ means max speed. I've always felt that the default settings had more to do with looking good on benchmarks, which tend to be small programs that will fit entirely within the L2 cache than what's best for overall performance, so I normally set it optimize for smallest size.
c++
c
optimization
null
null
null
open
How do you normally set up your compiler's optimization settings? === Do you normally set your compiler to optimize for maximum speed or smallest code size? or do you manually configure individual optimization settings? Why? I notice most of the time people tend to just leave compiler optimization settings to their default state, which with visual c++ means max speed. I've always felt that the default settings had more to do with looking good on benchmarks, which tend to be small programs that will fit entirely within the L2 cache than what's best for overall performance, so I normally set it optimize for smallest size.
0
53,820
09/10/2008 11:47:55
2,965
08/26/2008 09:12:59
51
6
Why does windows XP minimize my swing full screen window on my second screen ?
In the application I'm developping (in Java/swing), I have to show a full screen window on the *second* screen of the user. I did this using a code similar to the one you'll find below... Be, as soon as I click in a window opened by windows explorer, or as soon as I open windows explorer (i'm using windows XP), the full screen window is minimized... Do you know any way or workaround to fix this problem, or is there something important I did not understand with full screen windows? Thanks for the help, import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JWindow; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Window; import javax.swing.JButton; import javax.swing.JToggleButton; import java.awt.Rectangle; import java.awt.GridBagLayout; import javax.swing.JLabel; public class FullScreenTest { private JFrame jFrame = null; // @jve:decl-index=0:visual-constraint="94,35" private JPanel jContentPane = null; private JToggleButton jToggleButton = null; private JPanel jFSPanel = null; // @jve:decl-index=0:visual-constraint="392,37" private JLabel jLabel = null; private Window window; /** * This method initializes jFrame * * @return javax.swing.JFrame */ private JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame(); jFrame.setSize(new Dimension(474, 105)); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jFrame.setContentPane(getJContentPane()); } return jFrame; } /** * This method initializes jContentPane * * @return javax.swing.JPanel */ private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.add(getJToggleButton(), null); } return jContentPane; } /** * This method initializes jToggleButton * * @return javax.swing.JToggleButton */ private JToggleButton getJToggleButton() { if (jToggleButton == null) { jToggleButton = new JToggleButton(); jToggleButton.setBounds(new Rectangle(50, 23, 360, 28)); jToggleButton.setText("Show Full Screen Window on 2nd screen"); jToggleButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { showFullScreenWindow(jToggleButton.isSelected()); } }); } return jToggleButton; } protected void showFullScreenWindow(boolean b) { if(window==null){ window = initFullScreenWindow(); } window.setVisible(b); } private Window initFullScreenWindow() { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice[] gds = ge.getScreenDevices(); GraphicsDevice gd = gds[1]; JWindow window = new JWindow(gd.getDefaultConfiguration()); window.setContentPane(getJFSPanel()); gd.setFullScreenWindow(window); return window; } /** * This method initializes jFSPanel * * @return javax.swing.JPanel */ private JPanel getJFSPanel() { if (jFSPanel == null) { jLabel = new JLabel(); jLabel.setBounds(new Rectangle(18, 19, 500, 66)); jLabel.setText("Hello ! Now, juste open windows explorer and see what happens..."); jFSPanel = new JPanel(); jFSPanel.setLayout(null); jFSPanel.setSize(new Dimension(500, 107)); jFSPanel.add(jLabel, null); } return jFSPanel; } /** * @param args */ public static void main(String[] args) { FullScreenTest me = new FullScreenTest(); me.getJFrame().setVisible(true); } }
java
windows
swing
null
null
null
open
Why does windows XP minimize my swing full screen window on my second screen ? === In the application I'm developping (in Java/swing), I have to show a full screen window on the *second* screen of the user. I did this using a code similar to the one you'll find below... Be, as soon as I click in a window opened by windows explorer, or as soon as I open windows explorer (i'm using windows XP), the full screen window is minimized... Do you know any way or workaround to fix this problem, or is there something important I did not understand with full screen windows? Thanks for the help, import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JWindow; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Window; import javax.swing.JButton; import javax.swing.JToggleButton; import java.awt.Rectangle; import java.awt.GridBagLayout; import javax.swing.JLabel; public class FullScreenTest { private JFrame jFrame = null; // @jve:decl-index=0:visual-constraint="94,35" private JPanel jContentPane = null; private JToggleButton jToggleButton = null; private JPanel jFSPanel = null; // @jve:decl-index=0:visual-constraint="392,37" private JLabel jLabel = null; private Window window; /** * This method initializes jFrame * * @return javax.swing.JFrame */ private JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame(); jFrame.setSize(new Dimension(474, 105)); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jFrame.setContentPane(getJContentPane()); } return jFrame; } /** * This method initializes jContentPane * * @return javax.swing.JPanel */ private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.add(getJToggleButton(), null); } return jContentPane; } /** * This method initializes jToggleButton * * @return javax.swing.JToggleButton */ private JToggleButton getJToggleButton() { if (jToggleButton == null) { jToggleButton = new JToggleButton(); jToggleButton.setBounds(new Rectangle(50, 23, 360, 28)); jToggleButton.setText("Show Full Screen Window on 2nd screen"); jToggleButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { showFullScreenWindow(jToggleButton.isSelected()); } }); } return jToggleButton; } protected void showFullScreenWindow(boolean b) { if(window==null){ window = initFullScreenWindow(); } window.setVisible(b); } private Window initFullScreenWindow() { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice[] gds = ge.getScreenDevices(); GraphicsDevice gd = gds[1]; JWindow window = new JWindow(gd.getDefaultConfiguration()); window.setContentPane(getJFSPanel()); gd.setFullScreenWindow(window); return window; } /** * This method initializes jFSPanel * * @return javax.swing.JPanel */ private JPanel getJFSPanel() { if (jFSPanel == null) { jLabel = new JLabel(); jLabel.setBounds(new Rectangle(18, 19, 500, 66)); jLabel.setText("Hello ! Now, juste open windows explorer and see what happens..."); jFSPanel = new JPanel(); jFSPanel.setLayout(null); jFSPanel.setSize(new Dimension(500, 107)); jFSPanel.add(jLabel, null); } return jFSPanel; } /** * @param args */ public static void main(String[] args) { FullScreenTest me = new FullScreenTest(); me.getJFrame().setVisible(true); } }
0
53,827
09/10/2008 11:53:16
5,330
09/09/2008 07:44:06
123
5
Checking available stack size in C
I'm using MinGW with GCC 3.4.5 (mingw-special vista r3). My C application uses a lot of stack so I was wondering is there any way I can tell programatically how much stack is remaining so I can cleanly handle the situation if I find that I'm about to run out. If not what other ways would you work around the problem of potentially running out of stack space?
c
stack
mingw
null
null
null
open
Checking available stack size in C === I'm using MinGW with GCC 3.4.5 (mingw-special vista r3). My C application uses a lot of stack so I was wondering is there any way I can tell programatically how much stack is remaining so I can cleanly handle the situation if I find that I'm about to run out. If not what other ways would you work around the problem of potentially running out of stack space?
0
53,829
09/10/2008 11:55:38
5,534
09/10/2008 10:12:48
1
1
How to support multiple languages on a microcontroller?
I'm currently working on upgrading a product for the Chinese market. The target is a ARMTDMI7 with a QVGA display. Most resources I've located on the net are targeted at desktop or web programming rather than embedded devices. - Can anyone suggest some tools and resources that might be useful? - What are the best techniques for extracting literal strings and communicating with translators?
translation
microcontroller
localization
null
null
null
open
How to support multiple languages on a microcontroller? === I'm currently working on upgrading a product for the Chinese market. The target is a ARMTDMI7 with a QVGA display. Most resources I've located on the net are targeted at desktop or web programming rather than embedded devices. - Can anyone suggest some tools and resources that might be useful? - What are the best techniques for extracting literal strings and communicating with translators?
0
53,841
09/10/2008 12:04:29
1,228
08/13/2008 13:58:55
1,403
106
Can XpsDocuments be serialized to XML for storage in a database?
And, if not, is the only other alternative a blob?
sql-server
xpsdocument
null
null
null
null
open
Can XpsDocuments be serialized to XML for storage in a database? === And, if not, is the only other alternative a blob?
0
53,844
09/10/2008 12:06:59
2,260
08/21/2008 11:39:22
622
65
How can I evaluate a C# expression dynamically?
I would like to do the equivalent of: object result = Eval("1 + 3"); string now = Eval("System.DateTime.Now().ToString()") as string
c#
reflection
eval
null
null
null
open
How can I evaluate a C# expression dynamically? === I would like to do the equivalent of: object result = Eval("1 + 3"); string now = Eval("System.DateTime.Now().ToString()") as string
0
53,845
09/10/2008 12:09:26
4,358
09/03/2008 02:56:48
1
0
Java Compiler Options to produce .exe files.
What compiler (I'm using gcj 4.x) options should I use to generate an "exe" file for my java application to run in windows?
java
windows
compiler
gnu
null
null
open
Java Compiler Options to produce .exe files. === What compiler (I'm using gcj 4.x) options should I use to generate an "exe" file for my java application to run in windows?
0
53,849
09/10/2008 12:10:25
1,288
08/14/2008 12:14:17
726
51
How do I tokenize a string in C++?
Java has a convenient split method: String str = "The quick brown fox"; String[] results = str.split(" "); Is there an easy way to do this in C++?
c++
string
null
null
null
null
open
How do I tokenize a string in C++? === Java has a convenient split method: String str = "The quick brown fox"; String[] results = str.split(" "); Is there an easy way to do this in C++?
0
53,857
09/10/2008 12:14:05
123
08/02/2008 08:01:26
1,351
67
How to create Virtual COM ports..
I am trying to implement a software [Null Modem][1]. Any suggestion how to create virtual COM Ports? Looking for tips, strategy, known techniques, etc.. [1]: http://en.wikipedia.org/wiki/Null_modem
communication
port
virtual-com-port
null
null
null
open
How to create Virtual COM ports.. === I am trying to implement a software [Null Modem][1]. Any suggestion how to create virtual COM Ports? Looking for tips, strategy, known techniques, etc.. [1]: http://en.wikipedia.org/wiki/Null_modem
0
53,873
09/10/2008 12:26:12
1,228
08/13/2008 13:58:55
1,407
106
Can a Linq query retrieve BLOBs from a Sql Database?
And how do they come out?
sql-server
linq-to-sql
blob
null
null
null
open
Can a Linq query retrieve BLOBs from a Sql Database? === And how do they come out?
0
53,881
09/10/2008 12:31:21
2,977
08/26/2008 09:57:30
73
10
What is your preferred site for code snippets
Do you use any public sites for code-snippets? If so, can you let me know which ones you would recommend?
html
code-snippets
website
null
null
null
open
What is your preferred site for code snippets === Do you use any public sites for code-snippets? If so, can you let me know which ones you would recommend?
0
53,887
09/10/2008 12:33:46
123
08/02/2008 08:01:26
1,356
68
Where do you go to tickle your brain?
I am sure we all have some place to go to get our brain teased! Sometimes i visit [![Project Euler][1]](http://projecteuler.net/index.php?section=problems) Where do you all go? [1]: http://projecteuler.net/images/logo.jpg
challenge
language-agnostic
null
null
null
07/17/2012 12:12:30
not constructive
Where do you go to tickle your brain? === I am sure we all have some place to go to get our brain teased! Sometimes i visit [![Project Euler][1]](http://projecteuler.net/index.php?section=problems) Where do you all go? [1]: http://projecteuler.net/images/logo.jpg
4
53,911
09/10/2008 12:42:43
4,639
09/04/2008 23:07:22
57
1
In vim, how do I go back to where I was before a search?
Programming in vim I often go search for something, yank it, then go back to where I was, insert it, modify it. The problem is that after I search and find, I need to MANUALLY find my way back to where I was. Is there an automatic way to go back to where I was when I initiated my last search?
vim
vi
null
null
null
null
open
In vim, how do I go back to where I was before a search? === Programming in vim I often go search for something, yank it, then go back to where I was, insert it, modify it. The problem is that after I search and find, I need to MANUALLY find my way back to where I was. Is there an automatic way to go back to where I was when I initiated my last search?
0
53,913
09/10/2008 12:42:53
5,465
09/09/2008 20:28:40
1
0
How can I lay images out in a grid using XSL-FO?
I'm trying to produce sheets of photographs with captions arranged in a grid using XSLT and XSL-FO. The photo URLs and captions are produced using a FOR XML query against an SQL Server database, and the number of photos returned varies from sheet to sheet. I want to lay the photos out in four columns, filling the grid from left to right and from top to bottom. In HTML I'd do this by putting each photo and caption into a div and using "float: left" to make them flow into the grid. Is there a similarly elegant method using XSL-FO?
xslt
xsl-fo
null
null
null
null
open
How can I lay images out in a grid using XSL-FO? === I'm trying to produce sheets of photographs with captions arranged in a grid using XSLT and XSL-FO. The photo URLs and captions are produced using a FOR XML query against an SQL Server database, and the number of photos returned varies from sheet to sheet. I want to lay the photos out in four columns, filling the grid from left to right and from top to bottom. In HTML I'd do this by putting each photo and caption into a div and using "float: left" to make them flow into the grid. Is there a similarly elegant method using XSL-FO?
0
53,939
09/10/2008 12:52:04
1,122
08/12/2008 14:00:43
598
60
Why can't Visual Studio run on more than one core? CPU at 25%
I'm running Visual Studio 2008 with the stuff-of-nightmares awful MS test framework. Trouble is that it's sending my CPU to 100% (well 25% on a quad-core). My question is why can't Visual Studio run on more than one core? Surely M$ must have a sufficient handle* on threading to get this to work. On a scale of 1 - 10, how hard do you think it is for a company of 60,000+ people get one of their flagship products working on a normal developer machine?
visual-studio
microsoft
null
null
null
null
open
Why can't Visual Studio run on more than one core? CPU at 25% === I'm running Visual Studio 2008 with the stuff-of-nightmares awful MS test framework. Trouble is that it's sending my CPU to 100% (well 25% on a quad-core). My question is why can't Visual Studio run on more than one core? Surely M$ must have a sufficient handle* on threading to get this to work. On a scale of 1 - 10, how hard do you think it is for a company of 60,000+ people get one of their flagship products working on a normal developer machine?
0
53,941
09/10/2008 12:53:35
1,695
08/18/2008 02:49:06
773
64
Is there a tool that can convert common image formats (.bmp, jpg,..) to .emf files?
I'm using the GoDiagrams suite which seems to recommend .emf files for node images since they scale better on resizing. Bitmaps get all blurry. Google doesn't show up any good tools that seem to do this... So to reiterate I'm looking for a image converter (preferably free) that converts an image (in one of the common formats like Bitmaps or JPEGs or GIFs) to an .EMF File.
image
null
null
null
null
null
open
Is there a tool that can convert common image formats (.bmp, jpg,..) to .emf files? === I'm using the GoDiagrams suite which seems to recommend .emf files for node images since they scale better on resizing. Bitmaps get all blurry. Google doesn't show up any good tools that seem to do this... So to reiterate I'm looking for a image converter (preferably free) that converts an image (in one of the common formats like Bitmaps or JPEGs or GIFs) to an .EMF File.
0
53,945
09/10/2008 12:55:43
4,174
09/02/2008 08:59:44
246
7
Dynamically inserting javascript into HTML that uses document.write
I am currently loading a lightbox style popup that loads it's HTML from an XHR call. This content is then displayed in a 'modial' popup using `element.innerHTML = content` This works like a charm. In another section of this website I use a Flickr 'badge' (<http://www.elliotswan.com/2006/08/06/custom-flickr-badge-api-documentation/>) to load flickr images dynamically. This is done including a script tag that loads a flickr javascript, which in turn does some `document.write` statments. Both of them work perfectly when included in the HTML. Only when loading the flickr badge code _inside_ the lightbox, no content is rendered at all. It seems that using `innerHTML` to write `document.write` statements is taking it a step too far, but I cannot find any clue in the javascript implementations (FF2&3, IE6&7) of this behavior. Can anyone clarify if this should or shouldn't work? Thanks.
javascript
html
ajax
null
null
null
open
Dynamically inserting javascript into HTML that uses document.write === I am currently loading a lightbox style popup that loads it's HTML from an XHR call. This content is then displayed in a 'modial' popup using `element.innerHTML = content` This works like a charm. In another section of this website I use a Flickr 'badge' (<http://www.elliotswan.com/2006/08/06/custom-flickr-badge-api-documentation/>) to load flickr images dynamically. This is done including a script tag that loads a flickr javascript, which in turn does some `document.write` statments. Both of them work perfectly when included in the HTML. Only when loading the flickr badge code _inside_ the lightbox, no content is rendered at all. It seems that using `innerHTML` to write `document.write` statements is taking it a step too far, but I cannot find any clue in the javascript implementations (FF2&3, IE6&7) of this behavior. Can anyone clarify if this should or shouldn't work? Thanks.
0
53,956
09/10/2008 13:00:21
2,469
08/22/2008 12:41:47
581
41
HTML to Image .tiff File
Is there a way to convert a HTML string into a Image .tiff file? I am using C# .NET 3.5. The requirement is to give the user an option to fact a confirmation. The confirmation is created with XML and a XSLT typically it is e-mailed. Is there a way I can take the HTML string generated by the transformation HTML string and convert that to a .tiff or any image that can be faxed? 3rd party software is allowed, however the cheaper the better. We are using a 3rd party fax library, that will only accept .tiff images, but if I can get the HTML to be any image I can covert it into a .tiff.
c#
.net
html
image
tiff
null
open
HTML to Image .tiff File === Is there a way to convert a HTML string into a Image .tiff file? I am using C# .NET 3.5. The requirement is to give the user an option to fact a confirmation. The confirmation is created with XML and a XSLT typically it is e-mailed. Is there a way I can take the HTML string generated by the transformation HTML string and convert that to a .tiff or any image that can be faxed? 3rd party software is allowed, however the cheaper the better. We are using a 3rd party fax library, that will only accept .tiff images, but if I can get the HTML to be any image I can covert it into a .tiff.
0
53,961
09/10/2008 13:04:01
4,200
09/02/2008 09:57:33
215
12
Locate and add project reference for .Net assembly containing a given type?
I'm working with a large (270+ project) VS.Net solution. Yes, I know this is pushing the friendship with VS but it's inherited and blah blah. Anyway, to speed up the solution load and compile time I've removed all projects that I'm not currently working on... which in turn has removed those project references from the projects I want to retain. So now I'm going through a mind numbing process of adding binary references to the retained projects so that the referenced Types can be found. Here's how I'm working at present; - Attempt to compile, get thousands of errors, 'type or namespace missing' - Copy the first line of the error list to the clipboard - Using a perl script hooked up to a hotkey (AHK) I extract the type name from the error message and store it in the windows clipboard - I paste the type name into source insight symbol browser and note the assembly containing the Type - I go back to VS and add that assembly as a binary reference to the relevant project So now, after about 30 mins I'm thinking there's just got to be a quicker way...
c#
.net
visual-studio
null
null
null
open
Locate and add project reference for .Net assembly containing a given type? === I'm working with a large (270+ project) VS.Net solution. Yes, I know this is pushing the friendship with VS but it's inherited and blah blah. Anyway, to speed up the solution load and compile time I've removed all projects that I'm not currently working on... which in turn has removed those project references from the projects I want to retain. So now I'm going through a mind numbing process of adding binary references to the retained projects so that the referenced Types can be found. Here's how I'm working at present; - Attempt to compile, get thousands of errors, 'type or namespace missing' - Copy the first line of the error list to the clipboard - Using a perl script hooked up to a hotkey (AHK) I extract the type name from the error message and store it in the windows clipboard - I paste the type name into source insight symbol browser and note the assembly containing the Type - I go back to VS and add that assembly as a binary reference to the relevant project So now, after about 30 mins I'm thinking there's just got to be a quicker way...
0
53,965
09/10/2008 13:04:57
572
08/06/2008 20:56:54
3,397
266
What is wrong with this PHP regular expression?
$output = preg_replace("|(/D)(/s+)(/d+)(;)|", "//1,//3;", $output); I'm trying to replace all alphabetical character followed by one or more whitespace characters (tabs and/or spaces) followed by one or more numerical characters followed by a semicolon with the alphabetical character followed by a comma followed by the numerical digits and then the semicolon. I'll provide an example: Start: hello world 1007; End: hello world,1007;
php
regex
null
null
null
null
open
What is wrong with this PHP regular expression? === $output = preg_replace("|(/D)(/s+)(/d+)(;)|", "//1,//3;", $output); I'm trying to replace all alphabetical character followed by one or more whitespace characters (tabs and/or spaces) followed by one or more numerical characters followed by a semicolon with the alphabetical character followed by a comma followed by the numerical digits and then the semicolon. I'll provide an example: Start: hello world 1007; End: hello world,1007;
0
53,967
09/10/2008 13:05:56
4,694
09/05/2008 09:30:26
95
8
How would you implement the IEnumerator interface?
I have a class that map objects to objects, but unlike dictionary it maps them both ways. I am now trying to implement a custom IEnumerator interface that iterates through the values. public class Mapper<K,T> : IEnumerable<T>, IEnumerator<T> { C5.TreeDictionary<K,T> KToTMap = new TreeDictionary<K,T>(); C5.HashDictionary<T,K> TToKMap = new HashDictionary<T,K>(); public void Add(K key, T value) { KToTMap.Add(key, value); TToKMap.Add(value, key); } public int Count { get { return KToTMap.Count; } } public K this[T obj] { get { return TToKMap[obj]; } } public T this[K obj] { get { return KToTMap[obj]; } } public IEnumerator<T> GetEnumerator() { return KToTMap.Values.GetEnumerator(); } public T Current { get { throw new NotImplementedException(); } } public void Dispose() { throw new NotImplementedException(); } object System.Collections.IEnumerator.Current { get { throw new NotImplementedException(); } } public bool MoveNext() { ; } public void Reset() { throw new NotImplementedException(); } }
.net
collections
implementation
null
null
null
open
How would you implement the IEnumerator interface? === I have a class that map objects to objects, but unlike dictionary it maps them both ways. I am now trying to implement a custom IEnumerator interface that iterates through the values. public class Mapper<K,T> : IEnumerable<T>, IEnumerator<T> { C5.TreeDictionary<K,T> KToTMap = new TreeDictionary<K,T>(); C5.HashDictionary<T,K> TToKMap = new HashDictionary<T,K>(); public void Add(K key, T value) { KToTMap.Add(key, value); TToKMap.Add(value, key); } public int Count { get { return KToTMap.Count; } } public K this[T obj] { get { return TToKMap[obj]; } } public T this[K obj] { get { return KToTMap[obj]; } } public IEnumerator<T> GetEnumerator() { return KToTMap.Values.GetEnumerator(); } public T Current { get { throw new NotImplementedException(); } } public void Dispose() { throw new NotImplementedException(); } object System.Collections.IEnumerator.Current { get { throw new NotImplementedException(); } } public bool MoveNext() { ; } public void Reset() { throw new NotImplementedException(); } }
0
53,989
09/10/2008 13:09:32
1,109
08/12/2008 12:16:58
1,039
74
Linking directly to a SWF, what are the downsides?
Usually Flash and Flex applications are embedded on in HTML using either a combination of `object` and `embed` tags, or more commonly using JavaScript. However, if you link directly to a SWF file it will open in the browser window and without looking in the address bar you can't tell that it wasn't embedded in HTML with the size set to 100% width and height. Considering the overhead of the HTML, CSS and JavaScript needed to embed a Flash or Flex application filling 100% of the browser window, what are the downsides of linking directly to the SWF file instead? What are the upsides? I can think of one upside and three downsides: you don't need the 100+ lines of HTML, JavaScript and CSS that are otherwise required, but you have no plugin detection, no version checking and you loose your best SEO option (progressive enhancement).
flex
flash
embed
null
null
null
open
Linking directly to a SWF, what are the downsides? === Usually Flash and Flex applications are embedded on in HTML using either a combination of `object` and `embed` tags, or more commonly using JavaScript. However, if you link directly to a SWF file it will open in the browser window and without looking in the address bar you can't tell that it wasn't embedded in HTML with the size set to 100% width and height. Considering the overhead of the HTML, CSS and JavaScript needed to embed a Flash or Flex application filling 100% of the browser window, what are the downsides of linking directly to the SWF file instead? What are the upsides? I can think of one upside and three downsides: you don't need the 100+ lines of HTML, JavaScript and CSS that are otherwise required, but you have no plugin detection, no version checking and you loose your best SEO option (progressive enhancement).
0
53,997
09/10/2008 13:12:07
3,834
08/31/2008 06:25:52
39
7
Any good AJAX framework for Google App Engine apps?
I am trying to implement AJAX in my Google App Engine application, and so I am looking for a good AJAX framework that will help me. Anyone has any idea? I am thinking about Google Web Toolkit, how good it is in terms of creating AJAX for Google App Engine?
python
ajax
google-app-engine
null
null
null
open
Any good AJAX framework for Google App Engine apps? === I am trying to implement AJAX in my Google App Engine application, and so I am looking for a good AJAX framework that will help me. Anyone has any idea? I am thinking about Google Web Toolkit, how good it is in terms of creating AJAX for Google App Engine?
0
54,001
09/10/2008 13:13:14
3,208
08/27/2008 13:12:45
88
4
Could not load type 'XXX.Global'
Migrating a project from ASP.net 1.1 to ASP.net 2.0 and I keep hitting this error. I don't actually need Global because I am not adding anything to it, but after I remove it I get more errors.
asp.net
visual-studio
null
null
null
null
open
Could not load type 'XXX.Global' === Migrating a project from ASP.net 1.1 to ASP.net 2.0 and I keep hitting this error. I don't actually need Global because I am not adding anything to it, but after I remove it I get more errors.
0
54,017
09/10/2008 13:22:03
4,358
09/03/2008 02:56:48
8
2
What are the best Java Podcast you can find on the net?
What are the best Java coding practices Podcast you can find on the net? I'm thinking in a podcast like **HeardingCode** or **Hanselminutes**, but oriented to java development... is there any this good out there? thanks!
java
podcast
null
null
null
09/11/2011 17:26:19
not constructive
What are the best Java Podcast you can find on the net? === What are the best Java coding practices Podcast you can find on the net? I'm thinking in a podcast like **HeardingCode** or **Hanselminutes**, but oriented to java development... is there any this good out there? thanks!
4
54,036
09/10/2008 13:31:03
3,468
08/28/2008 17:05:59
133
13
Programmatically access browser history
how can i create an application to read all my browser (firefox) history? i noticed that i have in C:\Users\user.name\AppData\Local\Mozilla\Firefox\Profiles\646vwtnu.default what looks like a sqlite database (urlclassifier3.sqlite) but i don't know if its really what is used to store de history information. i searched for examples on how to do this but didn't find anything. ps: although the title is similar i believe this question is not the same as ["How do you access browser history?"][1] [1]: http://stackoverflow.com/questions/48805/how-do-you-access-browser-history
firefox
null
null
null
null
null
open
Programmatically access browser history === how can i create an application to read all my browser (firefox) history? i noticed that i have in C:\Users\user.name\AppData\Local\Mozilla\Firefox\Profiles\646vwtnu.default what looks like a sqlite database (urlclassifier3.sqlite) but i don't know if its really what is used to store de history information. i searched for examples on how to do this but didn't find anything. ps: although the title is similar i believe this question is not the same as ["How do you access browser history?"][1] [1]: http://stackoverflow.com/questions/48805/how-do-you-access-browser-history
0
54,037
09/10/2008 13:31:29
797
08/09/2008 02:14:04
2,127
85
Credit card expiration dates - Inclusive or exclusive?
Say you've got a credit card number with an expiration date of 05/08 - i.e. May 2008. Does that mean the card expires on the morning of the 1st of May 2008, or the night of the 31st of May 2008?
payment
null
null
null
null
null
open
Credit card expiration dates - Inclusive or exclusive? === Say you've got a credit card number with an expiration date of 05/08 - i.e. May 2008. Does that mean the card expires on the morning of the 1st of May 2008, or the night of the 31st of May 2008?
0
54,038
09/10/2008 13:32:16
5,062
09/07/2008 16:29:22
1
0
Running a scheduled task in a Wordpress plug-in
I'm trying to write a Wordpress plug-in that automatically posts a blog post at a certain time of day. For example, read a bunch of RSS feeds and post a daily digest of all new entries. There are plug-ins that do something similar to what I want, but many of them rely on a cron job for the automated scheduling. I'll do that if I have to, but I was hoping there was a better way. Getting a typical Wordpress user to add a cron job isn't exactly friendly. Is there a good way to schedule a task that runs from a Wordpress plug-in? It doesn't have to run at exactly the right time.
php
wordpress
null
null
null
null
open
Running a scheduled task in a Wordpress plug-in === I'm trying to write a Wordpress plug-in that automatically posts a blog post at a certain time of day. For example, read a bunch of RSS feeds and post a daily digest of all new entries. There are plug-ins that do something similar to what I want, but many of them rely on a cron job for the automated scheduling. I'll do that if I have to, but I was hoping there was a better way. Getting a typical Wordpress user to add a cron job isn't exactly friendly. Is there a good way to schedule a task that runs from a Wordpress plug-in? It doesn't have to run at exactly the right time.
0
54,043
09/10/2008 13:35:13
5,056
09/07/2008 15:43:17
382
40
Does anyone know a library for working with quantity/unit of measure pairs?
I would like to be able to do such things as var m1 = new UnitOfMeasureQuantityPair(123.00, UnitOfMeasure.Pounds); var m2 = new UnitOfMeasureQuantityPair(123.00, UnitOfMeasure.Liters); m1.ToKilograms(); m2.ToPounds(new Density(7.0, DensityType.PoundsPerGallon); If there isn't something like this already, anybody interested in doing it as an os project?
.net
null
null
null
null
null
open
Does anyone know a library for working with quantity/unit of measure pairs? === I would like to be able to do such things as var m1 = new UnitOfMeasureQuantityPair(123.00, UnitOfMeasure.Pounds); var m2 = new UnitOfMeasureQuantityPair(123.00, UnitOfMeasure.Liters); m1.ToKilograms(); m2.ToPounds(new Density(7.0, DensityType.PoundsPerGallon); If there isn't something like this already, anybody interested in doing it as an os project?
0
54,047
09/10/2008 13:37:15
2,820
08/25/2008 11:37:16
268
19
Regex's For Developers
I've been trying to figure out a regex to allow me to search for a particular string while automatically skipping comments. Anyone have an RE like this or know of one? It doesn't even need to be sophisticated enough to skip `#if 0` blocks; I just want it to skip over `//` and `/*` blocks. The converse, that is only search inside comment blocks, would be very useful too. Environment: VS 2003 Language: C++
visual-c++
regex
utility
null
null
null
open
Regex's For Developers === I've been trying to figure out a regex to allow me to search for a particular string while automatically skipping comments. Anyone have an RE like this or know of one? It doesn't even need to be sophisticated enough to skip `#if 0` blocks; I just want it to skip over `//` and `/*` blocks. The converse, that is only search inside comment blocks, would be very useful too. Environment: VS 2003 Language: C++
0
54,050
09/10/2008 13:38:23
1,768
08/18/2008 13:32:15
165
13
How do you get the logged in Windows domain account from an ASP.NET application?
We have an ASP.NET application that manages it's own User, Roles and Permission database and we have recently added a field to the User table to hold the Windows domain account. I would like to make it so that the user doesn't have to **physically** log in to our application, but rather would be automatically logged in based on the currently logged in Windows domain account DOMAIN\username. We want to authenticate the Windows domain account against our own User table. This is a piece of cake to do in Windows Forms, is it possible to do this in Web Forms? I don't want the user to be prompted with a Windows challenge screen, I want our system to handle the log in.
login
asp.net
null
null
null
null
open
How do you get the logged in Windows domain account from an ASP.NET application? === We have an ASP.NET application that manages it's own User, Roles and Permission database and we have recently added a field to the User table to hold the Windows domain account. I would like to make it so that the user doesn't have to **physically** log in to our application, but rather would be automatically logged in based on the currently logged in Windows domain account DOMAIN\username. We want to authenticate the Windows domain account against our own User table. This is a piece of cake to do in Windows Forms, is it possible to do this in Web Forms? I don't want the user to be prompted with a Windows challenge screen, I want our system to handle the log in.
0
54,052
09/10/2008 13:39:09
507
08/06/2008 13:04:33
559
28
Tool to view the contents of the Solution User Options file (.suo)
Are there any free tools available to view the contents of the solution user options file (the .suo file that accompanies solution files)? I know it's basically formatted as a file system within the file, but I'd like to be able to view the contents so that I can figure out which aspects of my solution and customizations are causing it grow very large over time.
visual-studio
suo
null
null
null
null
open
Tool to view the contents of the Solution User Options file (.suo) === Are there any free tools available to view the contents of the solution user options file (the .suo file that accompanies solution files)? I know it's basically formatted as a file system within the file, but I'd like to be able to view the contents so that I can figure out which aspects of my solution and customizations are causing it grow very large over time.
0
54,059
09/10/2008 13:40:48
797
08/09/2008 02:14:04
2,127
85
Efficiently selecting a set of random elements from a linked list
Say I have a linked list of numbers of length N. N is very large and I don’t know in advance the exact value of N. How can I most efficiently write a function that will return k completely random numbers from the list?
language-agnostic
algorithm
list
null
null
null
open
Efficiently selecting a set of random elements from a linked list === Say I have a linked list of numbers of length N. N is very large and I don’t know in advance the exact value of N. How can I most efficiently write a function that will return k completely random numbers from the list?
0
54,068
09/10/2008 13:45:20
361
08/05/2008 04:20:27
564
24
Any restrictions on development in Vista
I'm looking at a new computer which will probably have vista on it. But there are so many editions of vista; are there any weird restrictions on what you can run on the various editions? For instance you couldn't run IIS on Windows ME. Can you still run IIS on the home editions of vista?
iis
windows-vista
null
null
null
null
open
Any restrictions on development in Vista === I'm looking at a new computer which will probably have vista on it. But there are so many editions of vista; are there any weird restrictions on what you can run on the various editions? For instance you couldn't run IIS on Windows ME. Can you still run IIS on the home editions of vista?
0
54,092
09/10/2008 13:51:31
296
08/04/2008 13:26:48
189
25
How to send MMS with C#
<br /> I need to send MMS thought a C# application. I have already found 2 interesting components: http://www.winwap.com<br /> http://www.nowsms.com Does anyone have experience with other third party components?<br /> Could someone explain what kind of server I need to send those MMS? Is it a classic SMTP Server? Thanks a lot!
c#
mms
null
null
null
null
open
How to send MMS with C# === <br /> I need to send MMS thought a C# application. I have already found 2 interesting components: http://www.winwap.com<br /> http://www.nowsms.com Does anyone have experience with other third party components?<br /> Could someone explain what kind of server I need to send those MMS? Is it a classic SMTP Server? Thanks a lot!
0
54,096
09/10/2008 13:53:12
1,212
08/13/2008 13:17:40
149
4
Secure session cookies in ASP.NET over HTTPS
I got a little curious after reading [this /. article][1] over hijacking HTTPS cookies. I tracked it down a bit, and a good resource I stumbled across lists a few ways to secure cookies [here][2]. Must I use adsutil, or will setting requireSSL in the httpCookies section of web.config cover session cookies in addition to all others ([covered here][3])? Is there anything else I should be considering to harden sessions further? [1]: http://it.slashdot.org/it/08/09/09/1558218.shtml [2]: http://casabasecurity.com/content/using-aspnet-session-handling-secure-sites-set-secure-flag [3]: http://msdn2.microsoft.com/en-us/library/ms228262.aspx
asp.net
security
session
cookies
null
null
open
Secure session cookies in ASP.NET over HTTPS === I got a little curious after reading [this /. article][1] over hijacking HTTPS cookies. I tracked it down a bit, and a good resource I stumbled across lists a few ways to secure cookies [here][2]. Must I use adsutil, or will setting requireSSL in the httpCookies section of web.config cover session cookies in addition to all others ([covered here][3])? Is there anything else I should be considering to harden sessions further? [1]: http://it.slashdot.org/it/08/09/09/1558218.shtml [2]: http://casabasecurity.com/content/using-aspnet-session-handling-secure-sites-set-secure-flag [3]: http://msdn2.microsoft.com/en-us/library/ms228262.aspx
0
54,104
09/10/2008 13:57:07
4,639
09/04/2008 23:07:22
72
1
Code completion for Perl in vim?
Surprisingly as you get good at vim, you can code even faster than standard IDEs such as Eclipse. But one thing I really miss is code completion, especially for long variable names and functions. Is there any way to enable code completion for Perl in vim?
perl
vim
vi
null
null
null
open
Code completion for Perl in vim? === Surprisingly as you get good at vim, you can code even faster than standard IDEs such as Eclipse. But one thing I really miss is code completion, especially for long variable names and functions. Is there any way to enable code completion for Perl in vim?
0
54,118
09/10/2008 14:05:56
4,140
09/02/2008 01:10:54
541
39
What is the Best Way to Populate a Menu Control on a Master Page
Database? Page variables? Enum????? looking for opionions here.
.net-3.5
menu
master-pages
null
null
null
open
What is the Best Way to Populate a Menu Control on a Master Page === Database? Page variables? Enum????? looking for opionions here.
0
54,130
09/10/2008 14:09:43
1,103
08/12/2008 12:00:50
31
6
Billing for phone calls
I have an arrangement with a couple of my regular clients whereby there's a regularly scheduled conference call to chat about various work being done and also new stuff coming down the pike. At first I never billed for this time, since some of it was spent on sales-y stuff like discussing potential new projects, etc. It also just seemed like a nice way to build goodwill. Over time, however, this has become problematic and I feel like I'm being taken advantage of. We're a small shop and often as many as 3 people need to attend these conference calls. For a 90 minute call, that's around $500 of potentially billable time that's being given away for free. Considering these calls happen once per week for a couple of different clients, and it adds up to something like $5K/month in lost (potential) revenue. What are standard industry practices around this kind of thing? Should I insist on billing for this time? Or is that being greedy and was my initial instinct not to bill correct?
business
consulting
billing
null
null
05/06/2012 23:06:20
off topic
Billing for phone calls === I have an arrangement with a couple of my regular clients whereby there's a regularly scheduled conference call to chat about various work being done and also new stuff coming down the pike. At first I never billed for this time, since some of it was spent on sales-y stuff like discussing potential new projects, etc. It also just seemed like a nice way to build goodwill. Over time, however, this has become problematic and I feel like I'm being taken advantage of. We're a small shop and often as many as 3 people need to attend these conference calls. For a 90 minute call, that's around $500 of potentially billable time that's being given away for free. Considering these calls happen once per week for a couple of different clients, and it adds up to something like $5K/month in lost (potential) revenue. What are standard industry practices around this kind of thing? Should I insist on billing for this time? Or is that being greedy and was my initial instinct not to bill correct?
2
54,138
09/10/2008 14:12:30
404
08/05/2008 13:34:59
627
43
Using jQuery to beautify someone else's html
I have a third-party app that creates HTML-based reports that I need to display. I have *some* control over how they look, but in general it's pretty primitive. I *can* inject some javascript, though. I'd like to try to inject some jQuery goodness into it to tidy it up some. One specific thing I would like to do is to take a table (an actual HTML &lt;table&gt;) that always contains one row and a variable number of columns and magically convert that into a tabbed view where the contents (always one &lt;div&gt; that I can supply an ID if necessary) of each original table cell represents a sheet in the tabbed view. I haven't found any good (read: simple) examples of re-parenting items like this, so I'm not sure where to begin. Can someone provide some hints on how I might try this?
html
jquery
null
null
null
null
open
Using jQuery to beautify someone else's html === I have a third-party app that creates HTML-based reports that I need to display. I have *some* control over how they look, but in general it's pretty primitive. I *can* inject some javascript, though. I'd like to try to inject some jQuery goodness into it to tidy it up some. One specific thing I would like to do is to take a table (an actual HTML &lt;table&gt;) that always contains one row and a variable number of columns and magically convert that into a tabbed view where the contents (always one &lt;div&gt; that I can supply an ID if necessary) of each original table cell represents a sheet in the tabbed view. I haven't found any good (read: simple) examples of re-parenting items like this, so I'm not sure where to begin. Can someone provide some hints on how I might try this?
0
54,142
09/10/2008 14:13:39
1,541
08/16/2008 13:56:32
114
7
C++ Comma Operator
How does the comma operator work in C++? For instance, if I do: a = b, c; Does a end up equaling b, or c? (Yes, I know this is easy to test - just documenting on here for someone to find the answer quickly.)
c++
null
null
null
null
null
open
C++ Comma Operator === How does the comma operator work in C++? For instance, if I do: a = b, c; Does a end up equaling b, or c? (Yes, I know this is easy to test - just documenting on here for someone to find the answer quickly.)
0
54,147
09/10/2008 14:14:48
1,523
08/16/2008 10:10:13
28
3
How do I insert a character at the caret with javascript?
I want to insert some special characters at the caret inside textboxes using javscript on a button. How can this be done? The script needs to find the active textbox and insert the character at the caret in that textbox. The script also needs to work in IE and Firefox.
javascript
null
null
null
null
null
open
How do I insert a character at the caret with javascript? === I want to insert some special characters at the caret inside textboxes using javscript on a button. How can this be done? The script needs to find the active textbox and insert the character at the caret in that textbox. The script also needs to work in IE and Firefox.
0
54,166
09/10/2008 14:20:17
4,337
09/02/2008 22:43:39
664
65
Handling Information overflow
Almost everyday I see new stuffs coming out of Beta or CTP releases from Microsoft. It used to be exciting but the list of products and technologies is getting bigger and bigger everyday. WPF, WF, Silverlight, Powershell, SSIS, SSDS, EF, LINQ, WCF, Data Services, XAML, Asp.Net AJAX, Asp.Net MVC blah blah.. Since I am in a Technical role (like most of you), fundamental knowledge or just familiarity is not enough. I need to dig a little deeper into all the new technologies, try out prototypes and check if everything fits together, considering lots of other critical factors like Business, technology maturity, environment and people. Not to mention comparison with other competing technologies for convincing my team. In some cases, you have to be strongly aware of concepts like REST and how it is different from SOAP. In other cases, you have to get your hands dirty for workflow solutions using WF. Again, one fine day you find that stuffs like WinFS is completely erased from the map and getting evolved into something different. One of the earliest warning I got for not updating my skills was when I was a bit slow to adopt SQL 2005. Because of that, I am still having a hard time catching up with SQL 2008. In another scenario, I was involved with .Net 2.0 at a very early stage and was able to adjust faster with .Net 3.0/3.5. Even the 3.5 SP1 has a bunch of new features. I admit I love gathering knowledge but was wondering if there are efficient ways of managing and absorbing all this information without affecting normal work schedule. My question is how do you all manage this information overload? One thing I have done is setting a filter. I loved reading hardware review sites as a hobby but now totally cut them off from my list. It will be interesting if you can share your views.
microsoft
null
null
null
null
null
open
Handling Information overflow === Almost everyday I see new stuffs coming out of Beta or CTP releases from Microsoft. It used to be exciting but the list of products and technologies is getting bigger and bigger everyday. WPF, WF, Silverlight, Powershell, SSIS, SSDS, EF, LINQ, WCF, Data Services, XAML, Asp.Net AJAX, Asp.Net MVC blah blah.. Since I am in a Technical role (like most of you), fundamental knowledge or just familiarity is not enough. I need to dig a little deeper into all the new technologies, try out prototypes and check if everything fits together, considering lots of other critical factors like Business, technology maturity, environment and people. Not to mention comparison with other competing technologies for convincing my team. In some cases, you have to be strongly aware of concepts like REST and how it is different from SOAP. In other cases, you have to get your hands dirty for workflow solutions using WF. Again, one fine day you find that stuffs like WinFS is completely erased from the map and getting evolved into something different. One of the earliest warning I got for not updating my skills was when I was a bit slow to adopt SQL 2005. Because of that, I am still having a hard time catching up with SQL 2008. In another scenario, I was involved with .Net 2.0 at a very early stage and was able to adjust faster with .Net 3.0/3.5. Even the 3.5 SP1 has a bunch of new features. I admit I love gathering knowledge but was wondering if there are efficient ways of managing and absorbing all this information without affecting normal work schedule. My question is how do you all manage this information overload? One thing I have done is setting a filter. I loved reading hardware review sites as a hobby but now totally cut them off from my list. It will be interesting if you can share your views.
0
54,169
09/10/2008 14:21:22
5,571
09/10/2008 14:15:35
1
1
What do you think will be the level of usage of Silverlight 1 year from now?
There is a lot of buzz about Microsoft Silverlight, especially after the Olympics. Also H264 will be supported in a future version. Where do you think Silverlight will be 1 year from now?
silverlight
null
null
null
null
null
open
What do you think will be the level of usage of Silverlight 1 year from now? === There is a lot of buzz about Microsoft Silverlight, especially after the Olympics. Also H264 will be supported in a future version. Where do you think Silverlight will be 1 year from now?
0
54,176
09/10/2008 14:22:33
5,556
09/10/2008 14:01:15
1
0
What are the advantages/disadvantages of using a CTE?
I'm looking at improving the performance of some SQL, currently CTEs are being used and referenced multiple times in the script. Would I get improvements over using a table variable instead? (Can't use a temporary table as the code is within functions)
sql
common-table-expression
null
null
null
null
open
What are the advantages/disadvantages of using a CTE? === I'm looking at improving the performance of some SQL, currently CTEs are being used and referenced multiple times in the script. Would I get improvements over using a table variable instead? (Can't use a temporary table as the code is within functions)
0
54,177
09/10/2008 14:22:39
4,530
09/04/2008 17:16:43
46
1
Website performance monitoring tools
I have websites that we are performance tuning and wanted to know if anyone has a good tool for monitoring secure web sites? What I am looking for is a tool that can log on to a web site and test a few links and the performance. At least one of the links will access another web-based product using single sign on. I would set it up to check the site every 5 to 15 minutes, record how long each page takes to render in the browser, and send an alert if anything goes wrong. Have you used anything like that that worked well (or very poorly)?
performance
website-monitoring
null
null
null
null
open
Website performance monitoring tools === I have websites that we are performance tuning and wanted to know if anyone has a good tool for monitoring secure web sites? What I am looking for is a tool that can log on to a web site and test a few links and the performance. At least one of the links will access another web-based product using single sign on. I would set it up to check the site every 5 to 15 minutes, record how long each page takes to render in the browser, and send an alert if anything goes wrong. Have you used anything like that that worked well (or very poorly)?
0
54,179
09/10/2008 14:23:16
2,443
08/22/2008 10:53:30
455
28
What should be considered when building a Recommendation Engine?
I've read the book [Programming Collective Intelligence][1] and found it fascinating. I'd recently heard about a challenge amazon had posted to the world to come up with a better recommendation engine for their system. The winner apparently produced the best algorithm by limiting the amount of information to that was being fed to it. As a first rule of thumb I guess... "**More information is not necessarily better when it comes to fuzzy algorithms."** I know's it's subjective, but ultimately it's a measurable thing (clicks in response to recommendations). Since most of us are dealing with the web these days and search can be considered a form of recommendation... I suspect I'm not the only one who'd appreciate other peoples ideas on this. In a nutshell, **"What is the best way to build a recommendation ?"** [1]: http://oreilly.com/catalog/9780596529321/ "Programming Collective Intelligence"
algorithm
recommendation-engine
null
null
null
null
open
What should be considered when building a Recommendation Engine? === I've read the book [Programming Collective Intelligence][1] and found it fascinating. I'd recently heard about a challenge amazon had posted to the world to come up with a better recommendation engine for their system. The winner apparently produced the best algorithm by limiting the amount of information to that was being fed to it. As a first rule of thumb I guess... "**More information is not necessarily better when it comes to fuzzy algorithms."** I know's it's subjective, but ultimately it's a measurable thing (clicks in response to recommendations). Since most of us are dealing with the web these days and search can be considered a form of recommendation... I suspect I'm not the only one who'd appreciate other peoples ideas on this. In a nutshell, **"What is the best way to build a recommendation ?"** [1]: http://oreilly.com/catalog/9780596529321/ "Programming Collective Intelligence"
0
54,184
09/10/2008 14:26:00
1,578
08/16/2008 20:25:25
378
17
Best tool to monitor network connection bandwidth
I'm looking for a very simple tool to monitor the bandwidth of all my applications. No need for extra features like traffic spying, I'm just interested by bandwidth. I already know Wireshark (which is great), but what I'm looking for is more something like TcpView (great tool from Sysinternals) with current bandwidth indication. PS: I'm interested by Windows tools only
windows
networking
null
null
null
null
open
Best tool to monitor network connection bandwidth === I'm looking for a very simple tool to monitor the bandwidth of all my applications. No need for extra features like traffic spying, I'm just interested by bandwidth. I already know Wireshark (which is great), but what I'm looking for is more something like TcpView (great tool from Sysinternals) with current bandwidth indication. PS: I'm interested by Windows tools only
0