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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
41,601 | 09/03/2008 12:57:25 | 4,392 | 09/03/2008 12:57:25 | 1 | 0 | Userinterface Testing | We are working on a large project.
GUI functionality added or modified on our project.With this introduction of new functionality we often introduce new problems in related parts. Testing is done manually by non technical users, but often some parts are not covered.
My question:
what is the best practice for organizing the UI testing of a winforms project. Is there an option to automated this testcase.
Thankx
| testing | integration-testing | null | null | null | null | open | Userinterface Testing
===
We are working on a large project.
GUI functionality added or modified on our project.With this introduction of new functionality we often introduce new problems in related parts. Testing is done manually by non technical users, but often some parts are not covered.
My question:
what is the best practice for organizing the UI testing of a winforms project. Is there an option to automated this testcase.
Thankx
| 0 |
41,630 | 09/03/2008 13:13:06 | 3,122 | 08/26/2008 18:58:15 | 55 | 3 | In Ruby, is it possible to concat arguments to a command line using backquotes ? | I would like to execute an OS command from my ruby script but I want to add an argument from a ruby variable.
I know that's possible by using keyword *system* like that :
#!/usr/bin/env ruby
directory = '/home/paulgreg/'
system 'ls ' + directory
but is that possible by using the "backquotes or backticks syntax" ?
(I mean by using that syntax : `ls`) | ruby | command-line | cli | commandline | null | null | open | In Ruby, is it possible to concat arguments to a command line using backquotes ?
===
I would like to execute an OS command from my ruby script but I want to add an argument from a ruby variable.
I know that's possible by using keyword *system* like that :
#!/usr/bin/env ruby
directory = '/home/paulgreg/'
system 'ls ' + directory
but is that possible by using the "backquotes or backticks syntax" ?
(I mean by using that syntax : `ls`) | 0 |
41,638 | 09/03/2008 13:17:59 | 231 | 08/03/2008 19:35:19 | 95 | 10 | Suggestions on how to map from Domain (ORM) objects to Data Transfer Objects (DTO) | The current system that I am working on makes use of Castle Activerecord to provide ORM (Object Relational Mapping) between the Domain objects and the database. This is all well and good and at most times actually works well!
The problem comes about with Castle Activerecords support for asynchronous execution, well, more specifically the SessionScope that manages the session that objects belong to. Long story short, bad stuff happens!
We are therefore looking for a way to easily convert (think automagically) from the Domain objects (who know that a DB exists and care) to the DTO object (who know nothing about the DB and care not for sessions, mapping attributes or all thing ORM).
Does anyone have suggestions on doing this. For the start I am looking for a basic One to One mapping of object. Domain object **Person** will be mapped to say **PersonDTO**. I do not want to do this manually since it is a waste.
Obviously reflection comes to mind, but I am hoping with some of the better IT knowledge floating around this site that *"cooler"* will be suggested.
Oh, I am working in C#, the ORM objects as said before a mapped with Castle ActiveRecord. | c# | orm | castle-activerecord | dto-mapping | null | null | open | Suggestions on how to map from Domain (ORM) objects to Data Transfer Objects (DTO)
===
The current system that I am working on makes use of Castle Activerecord to provide ORM (Object Relational Mapping) between the Domain objects and the database. This is all well and good and at most times actually works well!
The problem comes about with Castle Activerecords support for asynchronous execution, well, more specifically the SessionScope that manages the session that objects belong to. Long story short, bad stuff happens!
We are therefore looking for a way to easily convert (think automagically) from the Domain objects (who know that a DB exists and care) to the DTO object (who know nothing about the DB and care not for sessions, mapping attributes or all thing ORM).
Does anyone have suggestions on doing this. For the start I am looking for a basic One to One mapping of object. Domain object **Person** will be mapped to say **PersonDTO**. I do not want to do this manually since it is a waste.
Obviously reflection comes to mind, but I am hoping with some of the better IT knowledge floating around this site that *"cooler"* will be suggested.
Oh, I am working in C#, the ORM objects as said before a mapped with Castle ActiveRecord. | 0 |
41,640 | 09/03/2008 13:18:29 | 4,394 | 09/03/2008 13:18:29 | 1 | 0 | Mute Specific Application in Vista | I am in need of a way to mute a specific application in Vista.
Example: Mute just Firefox, but not all of the other application. Much similar to muting a specific program from within the volume mixer in vista.
If there is a program that will do this, i would appreciate that. Otherwise if there is a way to do this, I will write a small app(Preferrably something .net). | windows-vista | audio | null | null | null | null | open | Mute Specific Application in Vista
===
I am in need of a way to mute a specific application in Vista.
Example: Mute just Firefox, but not all of the other application. Much similar to muting a specific program from within the volume mixer in vista.
If there is a program that will do this, i would appreciate that. Otherwise if there is a way to do this, I will write a small app(Preferrably something .net). | 0 |
41,643 | 09/03/2008 13:19:39 | 745 | 08/08/2008 13:47:26 | 476 | 41 | Store more than 3GB of video-frames in memory, on 32-bit OS | At work we have an application to play 2K (2048*1556px) OpenEXR film sequences. It works well.. apart from when sequences that are over 3GB (quite common), then it has to unload old frames from memory, despite the fact all machines have 8-16GB of memory (which is addressable via the linux BIGMEM stuff).
The frames have to he cached into memory to play back in realtime. The OS is a several-year old 32-bit Fedora Distro (not possible to upgradable to 64bit, for the foreseeable future). The per-process limitation is 3GB per process.
Basically, is it possible to cache more than 3GB of data in memory, somehow? My initial idea was to spread the data between multiple processes, but I've no idea if this is possible.. | linux | memory | 32bit | null | null | null | open | Store more than 3GB of video-frames in memory, on 32-bit OS
===
At work we have an application to play 2K (2048*1556px) OpenEXR film sequences. It works well.. apart from when sequences that are over 3GB (quite common), then it has to unload old frames from memory, despite the fact all machines have 8-16GB of memory (which is addressable via the linux BIGMEM stuff).
The frames have to he cached into memory to play back in realtime. The OS is a several-year old 32-bit Fedora Distro (not possible to upgradable to 64bit, for the foreseeable future). The per-process limitation is 3GB per process.
Basically, is it possible to cache more than 3GB of data in memory, somehow? My initial idea was to spread the data between multiple processes, but I've no idea if this is possible.. | 0 |
41,647 | 09/03/2008 13:23:43 | 1,111 | 08/12/2008 12:40:23 | 10 | 10 | PHP Include function outputting unknown char | When using the php include function the include is succesfully executed, but it is also outputting a char before the output of the include is outputted, the char is of hex value 3F and I have no idea where it is coming from, although it seems to happen with every include.
At first I thbought it was file encoding, but this doesn't seem to be a problem. I have created a test case to demonstrate it: [http://driveefficiently.com/testinclude.php][1] this file consists of only:
<? include("include.inc"); ?>
and include.inc consists of only:
<? echo ("hello, world"); ?>
and yet, the output is: *"?hello, world"* where the ? is a char with a value of 3F. It is this value that I do not know the origins of and it is sometimes screwing up my sites a bit.
Any ideas of where this could be coming from? At first I thought it might be something to do with file encoding, but I don't think its a problem.
[1]: http://driveefficiently.com/testinclude.php | php | include | null | null | null | null | open | PHP Include function outputting unknown char
===
When using the php include function the include is succesfully executed, but it is also outputting a char before the output of the include is outputted, the char is of hex value 3F and I have no idea where it is coming from, although it seems to happen with every include.
At first I thbought it was file encoding, but this doesn't seem to be a problem. I have created a test case to demonstrate it: [http://driveefficiently.com/testinclude.php][1] this file consists of only:
<? include("include.inc"); ?>
and include.inc consists of only:
<? echo ("hello, world"); ?>
and yet, the output is: *"?hello, world"* where the ? is a char with a value of 3F. It is this value that I do not know the origins of and it is sometimes screwing up my sites a bit.
Any ideas of where this could be coming from? At first I thought it might be something to do with file encoding, but I don't think its a problem.
[1]: http://driveefficiently.com/testinclude.php | 0 |
41,652 | 09/03/2008 13:24:56 | 191 | 08/03/2008 09:55:26 | 99 | 2 | Using Custom MembershipProvider without a Login control in ASP.NET | We have got a custom MembershipProvider in asp.net. Now there are 2 possible scenario the user can be validated:
1. User login via login.aspx page by entering his username/password. I have used Login control and linked it with the MyMembershipProvider. This is working perfectly fine.
2. A authentication token is passed via URL in query string form a different web sites. For this I have one overload in MembershipProvider, Validate(string authenticationToken), which is actually validating the user. In this case we cannot use the Login control. Now how can I use the same MembershipProvider to validate the user without actually using the Login control? I tried to call Validate manually, but this is not Signing In the user.
Here is the code snippet I am using
if (!string.IsNullOrEmpty(Request.QueryString["authenticationToken"]))
{
string ticket = Request.QueryString["authenticationToken"];
MyMembershipProvider provider = Membership.Provider as MyMembershipProvider;
if (provider != null)
{
if (provider.ValidateUser(ticket))
// Login Success
else
// Login Fail
}
}
| asp.net | authentication | null | null | null | null | open | Using Custom MembershipProvider without a Login control in ASP.NET
===
We have got a custom MembershipProvider in asp.net. Now there are 2 possible scenario the user can be validated:
1. User login via login.aspx page by entering his username/password. I have used Login control and linked it with the MyMembershipProvider. This is working perfectly fine.
2. A authentication token is passed via URL in query string form a different web sites. For this I have one overload in MembershipProvider, Validate(string authenticationToken), which is actually validating the user. In this case we cannot use the Login control. Now how can I use the same MembershipProvider to validate the user without actually using the Login control? I tried to call Validate manually, but this is not Signing In the user.
Here is the code snippet I am using
if (!string.IsNullOrEmpty(Request.QueryString["authenticationToken"]))
{
string ticket = Request.QueryString["authenticationToken"];
MyMembershipProvider provider = Membership.Provider as MyMembershipProvider;
if (provider != null)
{
if (provider.ValidateUser(ticket))
// Login Success
else
// Login Fail
}
}
| 0 |
41,654 | 09/03/2008 13:25:01 | 1,876 | 08/19/2008 02:26:08 | 18 | 4 | C++ libraries to manipulate images | Do you know any open source/free software C++ libraries to manipulate images in these formats:
.jpg .gif .png .bmp ? The more formats it supports, the better. I am implementing a free program in C++ which hides a text file into one or more images, using [steganography][1].
I am working under Unix.
Thanks for any help in advance
[1]: http://en.wikipedia.org/wiki/Steganography | c++ | image | steganography | null | null | null | open | C++ libraries to manipulate images
===
Do you know any open source/free software C++ libraries to manipulate images in these formats:
.jpg .gif .png .bmp ? The more formats it supports, the better. I am implementing a free program in C++ which hides a text file into one or more images, using [steganography][1].
I am working under Unix.
Thanks for any help in advance
[1]: http://en.wikipedia.org/wiki/Steganography | 0 |
41,659 | 09/03/2008 13:26:55 | 4,249 | 09/02/2008 14:13:06 | 156 | 13 | Is there a way to access web.xml properties from a Java Bean? | Is there any way in the Servlet API to access properties specified in web.xml (such as initialization parameters) from within a Bean or Factory class that is not associated at all with the web container?
For example, I'm writing a Factory class, and I'd like to include some logic within the Factory to check a hierarchy of files and configuration locations to see which if any are available to determine which implementation class to instantiate - for example, 1) a properties file in the classpath, 2) a web.xml parameter, 3) a system property, or 4) some default logic if nothing else is available.
I'd like to be able to do this without injecting any reference to `ServletConfig` or anything similiar to my Factory - the code should be able to run ok outside of a Servlet Container.
This might sound a little bit uncommon, but I'd like for this component I'm working on to be able to be packaged with one of our webapps, and also be versatile enough to be packaged with some of our command-line tools without requiring a new properties file just for my component - so I was hoping to piggyback on top of other configuration files such as web.xml.
If I recall correctly, .NET has something like `Request.GetCurrentRequest()` to get a reference to the currently executing `Request` - but since this is a Java app I'm looking for something simliar that could be used to gain access to `ServletConfig`. | java | design-patterns | servlet | null | null | null | open | Is there a way to access web.xml properties from a Java Bean?
===
Is there any way in the Servlet API to access properties specified in web.xml (such as initialization parameters) from within a Bean or Factory class that is not associated at all with the web container?
For example, I'm writing a Factory class, and I'd like to include some logic within the Factory to check a hierarchy of files and configuration locations to see which if any are available to determine which implementation class to instantiate - for example, 1) a properties file in the classpath, 2) a web.xml parameter, 3) a system property, or 4) some default logic if nothing else is available.
I'd like to be able to do this without injecting any reference to `ServletConfig` or anything similiar to my Factory - the code should be able to run ok outside of a Servlet Container.
This might sound a little bit uncommon, but I'd like for this component I'm working on to be able to be packaged with one of our webapps, and also be versatile enough to be packaged with some of our command-line tools without requiring a new properties file just for my component - so I was hoping to piggyback on top of other configuration files such as web.xml.
If I recall correctly, .NET has something like `Request.GetCurrentRequest()` to get a reference to the currently executing `Request` - but since this is a Java app I'm looking for something simliar that could be used to gain access to `ServletConfig`. | 0 |
41,665 | 09/03/2008 13:29:58 | 191 | 08/03/2008 09:55:26 | 99 | 2 | Bmp to jpg/png in C# | Is there any way to convert a bmp image to jpg/png without losing the quality in C#? Using Image class we to convert bmp to jpg but the quality of output image is very poor. | image-manipulation | c# | null | null | null | null | open | Bmp to jpg/png in C#
===
Is there any way to convert a bmp image to jpg/png without losing the quality in C#? Using Image class we to convert bmp to jpg but the quality of output image is very poor. | 0 |
41,674 | 09/03/2008 13:34:26 | 3,873 | 08/31/2008 14:45:39 | 1 | 1 | Is there a class to generate a sample XML document from XSD schema in .NET | In Visual Studio you can create a template XML document from an existing schema. The new XML Schema Explorer (<http://msdn.microsoft.com/en-us/library/cc716766.aspx>) in VS2008 SP1 takes this a stage further and can create a sample XML document complete with data.
Is there a class library in .NET to do this automatically without having to use Visual Studio? I found this article on MSDN <http://msdn.microsoft.com/en-us/library/aa302296.aspx> but it was written in 2004 so maybe there is something already included in .NET to do this now? | xml | xsd | .net | null | null | null | open | Is there a class to generate a sample XML document from XSD schema in .NET
===
In Visual Studio you can create a template XML document from an existing schema. The new XML Schema Explorer (<http://msdn.microsoft.com/en-us/library/cc716766.aspx>) in VS2008 SP1 takes this a stage further and can create a sample XML document complete with data.
Is there a class library in .NET to do this automatically without having to use Visual Studio? I found this article on MSDN <http://msdn.microsoft.com/en-us/library/aa302296.aspx> but it was written in 2004 so maybe there is something already included in .NET to do this now? | 0 |
41,676 | 09/03/2008 13:35:30 | 259 | 08/04/2008 08:10:58 | 268 | 25 | Getting the process id of a Carbon C++ application | Is there a way of getting the process id of my C++ application? I am using the Carbon framework, but not Cocoa | c++ | osx | carbon | null | null | null | open | Getting the process id of a Carbon C++ application
===
Is there a way of getting the process id of my C++ application? I am using the Carbon framework, but not Cocoa | 0 |
41,686 | 09/03/2008 13:41:07 | 1,900 | 08/19/2008 09:38:19 | 66 | 6 | Why is my image coming out garbled? | I've got some Java code using a servlet and Apache Commons FileUpload to upload a file to a set directory. It's working fine for character data (e.g. text files) but image files are coming out garbled. I can open them but the image doesn't look like it should. Here's my code:
Servlet
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
try {
String customerPath = "\\leetest\\";
// Check that we have a file upload request
boolean isMultipart = ServletFileUpload.isMultipartContent(request);
if (isMultipart) {
// Create a new file upload handler
ServletFileUpload upload = new ServletFileUpload();
// Parse the request
FileItemIterator iter = upload.getItemIterator(request);
while (iter.hasNext()) {
FileItemStream item = iter.next();
String name = item.getFieldName();
if (item.isFormField()) {
// Form field. Ignore for now
} else {
BufferedInputStream stream = new BufferedInputStream(item
.openStream());
if (stream == null) {
LOGGER
.error("Something went wrong with fetching the stream for field "
+ name);
}
byte[] bytes = StreamUtils.getBytes(stream);
FileManager.createFile(customerPath, item.getName(), bytes);
stream.close();
}
}
}
} catch (Exception e) {
throw new UploadException("An error occured during upload: "
+ e.getMessage());
}
}
StreamUtils.getBytes(stream) looks like:
public static byte[] getBytes(InputStream src, int buffsize)
throws IOException {
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
byte[] buff = new byte[buffsize];
while (true) {
int nBytesRead = src.read(buff);
if (nBytesRead < 0) {
break;
}
byteStream.write(buff);
}
byte[] result = byteStream.toByteArray();
byteStream.close();
return result;
}
And finally FileManager.createFile looks like:
public static void createFile(String customerPath, String filename,
byte[] fileData) throws IOException {
customerPath = getFullPath(customerPath + filename);
File newFile = new File(customerPath);
if (!newFile.getParentFile().exists()) {
newFile.getParentFile().mkdirs();
}
FileOutputStream outputStream = new FileOutputStream(newFile);
outputStream.write(fileData);
outputStream.close();
}
Can anyone spot what I'm doing wrong?
Cheers,
Lee | java | file-io | commons-fileupload | null | null | null | open | Why is my image coming out garbled?
===
I've got some Java code using a servlet and Apache Commons FileUpload to upload a file to a set directory. It's working fine for character data (e.g. text files) but image files are coming out garbled. I can open them but the image doesn't look like it should. Here's my code:
Servlet
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
try {
String customerPath = "\\leetest\\";
// Check that we have a file upload request
boolean isMultipart = ServletFileUpload.isMultipartContent(request);
if (isMultipart) {
// Create a new file upload handler
ServletFileUpload upload = new ServletFileUpload();
// Parse the request
FileItemIterator iter = upload.getItemIterator(request);
while (iter.hasNext()) {
FileItemStream item = iter.next();
String name = item.getFieldName();
if (item.isFormField()) {
// Form field. Ignore for now
} else {
BufferedInputStream stream = new BufferedInputStream(item
.openStream());
if (stream == null) {
LOGGER
.error("Something went wrong with fetching the stream for field "
+ name);
}
byte[] bytes = StreamUtils.getBytes(stream);
FileManager.createFile(customerPath, item.getName(), bytes);
stream.close();
}
}
}
} catch (Exception e) {
throw new UploadException("An error occured during upload: "
+ e.getMessage());
}
}
StreamUtils.getBytes(stream) looks like:
public static byte[] getBytes(InputStream src, int buffsize)
throws IOException {
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
byte[] buff = new byte[buffsize];
while (true) {
int nBytesRead = src.read(buff);
if (nBytesRead < 0) {
break;
}
byteStream.write(buff);
}
byte[] result = byteStream.toByteArray();
byteStream.close();
return result;
}
And finally FileManager.createFile looks like:
public static void createFile(String customerPath, String filename,
byte[] fileData) throws IOException {
customerPath = getFullPath(customerPath + filename);
File newFile = new File(customerPath);
if (!newFile.getParentFile().exists()) {
newFile.getParentFile().mkdirs();
}
FileOutputStream outputStream = new FileOutputStream(newFile);
outputStream.write(fileData);
outputStream.close();
}
Can anyone spot what I'm doing wrong?
Cheers,
Lee | 0 |
41,692 | 09/03/2008 13:45:14 | 2,847 | 08/25/2008 14:12:52 | 3 | 4 | jquery tablesorter plugin | Im using the tablesorter plugin ( http://tablesorter.com ) and am having a problem with column widths in IE7, it looks fine in firefox and sometimes in IE7.
here's a screenshot of the problem:
[IE7 View][1]
and here's how it's supposed to look:
[Firefox view][2]
[1]: http://imagebin.antiyes.com/index431.html
[2]: http://imagebin.antiyes.com/index432.html | asp.net | javascript | html | jquery | tablesorter | null | open | jquery tablesorter plugin
===
Im using the tablesorter plugin ( http://tablesorter.com ) and am having a problem with column widths in IE7, it looks fine in firefox and sometimes in IE7.
here's a screenshot of the problem:
[IE7 View][1]
and here's how it's supposed to look:
[Firefox view][2]
[1]: http://imagebin.antiyes.com/index431.html
[2]: http://imagebin.antiyes.com/index432.html | 0 |
41,699 | 09/03/2008 13:47:03 | 634 | 08/07/2008 12:15:58 | 191 | 10 | Creating Windows service without Visual Studio | So creating a Windows service using Visual Studio is fairly trivial. My question goes a bit deeper as to what actually makes an executable installable as a service & how to write a service as a straight C application. I couldn't find a lot of references on this, but I'm presuming there has to be some interface I can implement so my .exe can be installed as a service. | windows | c | windows-services | visual-studio | null | null | open | Creating Windows service without Visual Studio
===
So creating a Windows service using Visual Studio is fairly trivial. My question goes a bit deeper as to what actually makes an executable installable as a service & how to write a service as a straight C application. I couldn't find a lot of references on this, but I'm presuming there has to be some interface I can implement so my .exe can be installed as a service. | 0 |
41,701 | 09/03/2008 13:48:30 | 4,397 | 09/03/2008 13:48:30 | 1 | 0 | Splitting tuples in Python - best practice? | I have a method in my Python code that returns a tuple - a row from a SQL query. Let's say it has three fields: (jobId, label, username)
For ease of passing it around between functions, I've been passing the entire tuple as a variable called 'job'. Eventually, however, I want to get at the bits, so I've been using code like this:
(jobId, label, username) = job
I've realised, however, that this is a maintenance nightmare, because now I can never add new fields to the result set without breaking all of my existing code. How should I have written this?
Here are my two best guesses:
(jobId, label, username) = (job[0], job[1], job[2])
...but that doesn't scale nicely when you have 15...20 fields
or to convert the results from the SQL query to a dictionary straight away and pass that around (I don't have control over the fact that it starts life as a tuple, that's fixed for me) | python | tuples | null | null | null | null | open | Splitting tuples in Python - best practice?
===
I have a method in my Python code that returns a tuple - a row from a SQL query. Let's say it has three fields: (jobId, label, username)
For ease of passing it around between functions, I've been passing the entire tuple as a variable called 'job'. Eventually, however, I want to get at the bits, so I've been using code like this:
(jobId, label, username) = job
I've realised, however, that this is a maintenance nightmare, because now I can never add new fields to the result set without breaking all of my existing code. How should I have written this?
Here are my two best guesses:
(jobId, label, username) = (job[0], job[1], job[2])
...but that doesn't scale nicely when you have 15...20 fields
or to convert the results from the SQL query to a dictionary straight away and pass that around (I don't have control over the fact that it starts life as a tuple, that's fixed for me) | 0 |
41,712 | 09/03/2008 13:54:22 | 3,717 | 08/30/2008 09:44:24 | 364 | 20 | Traditional ASP .NET vs MVC | As someone with some winforms and client applications experience - is it worth going back and learning the way traditional ASP .NET pages work, or is it okay with moving straight into ASP .NET MVC?
I'm kind of looking for pitfalls or traps in my knowledge of general C#, that I won't know from the screencast series and things on the ASP .NET site. | asp.net | asp.net-mvc | classicasp | null | null | null | open | Traditional ASP .NET vs MVC
===
As someone with some winforms and client applications experience - is it worth going back and learning the way traditional ASP .NET pages work, or is it okay with moving straight into ASP .NET MVC?
I'm kind of looking for pitfalls or traps in my knowledge of general C#, that I won't know from the screencast series and things on the ASP .NET site. | 0 |
41,715 | 09/03/2008 13:54:39 | 1,185 | 08/13/2008 12:02:03 | 949 | 66 | Excluding a folder from source control in an ASP.NET project? | Right now I am working with an ASP.NET website that automatically generates images and stores them in a temporary folder. When working on my local system these go going into a temporary folder that gets picked up by Visual Source Safe which then wants to check them in. As such, I am wondering if there is a way to just exclude that particular folder from source control?
I have done a bit of reading and found that there are ways to do this for [individual files][1], but I haven't found anything yet about an entire folder.
[1]: http://forums.msdn.microsoft.com/en-US/vssourcecontrol/thread/6cc4aab0-e7bc-44e8-baa3-045c9cd82e9a/ | asp.net | visual-sourcesafe | null | null | null | null | open | Excluding a folder from source control in an ASP.NET project?
===
Right now I am working with an ASP.NET website that automatically generates images and stores them in a temporary folder. When working on my local system these go going into a temporary folder that gets picked up by Visual Source Safe which then wants to check them in. As such, I am wondering if there is a way to just exclude that particular folder from source control?
I have done a bit of reading and found that there are ways to do this for [individual files][1], but I haven't found anything yet about an entire folder.
[1]: http://forums.msdn.microsoft.com/en-US/vssourcecontrol/thread/6cc4aab0-e7bc-44e8-baa3-045c9cd82e9a/ | 0 |
41,717 | 09/03/2008 13:55:15 | 1,219 | 08/13/2008 13:44:47 | 1,652 | 114 | What's the best way to implement user controls in ASP.NET MVC? | Like many others on this site I am considering a move to ASP.NET MVC for future projects. Currently my sites are running the traditional ASP.NET 2.0 Web Forms, and it works Ok for us, so my other option is just to stick with what I know and make the move to ASP.NET 3.5 with the integrated AJAX stuff.
I'm wondering about how user controls work in ASP.NET MVC. We have tons of .ASCX controls, and a few composite controls. When I work with web designers it is very easy to get them to use ASCX controls effectively, even without any programming knowledge, so that's a definite plus. But then of course the downsides are the page lifecycle, which can be maddening, and the fact that ASCX controls are hard to share between different projects. Composite controls are share-able, but basically a black box to a designer.
What's the model in ASP.NET MVC? Is there a way to create controls that solves the problems we've dealt with using ASCX and composite controls? Allowing easy access for web designers without having to worry about code being broken is an important consideration. | asp.net-mvc | usercontrols | null | null | null | null | open | What's the best way to implement user controls in ASP.NET MVC?
===
Like many others on this site I am considering a move to ASP.NET MVC for future projects. Currently my sites are running the traditional ASP.NET 2.0 Web Forms, and it works Ok for us, so my other option is just to stick with what I know and make the move to ASP.NET 3.5 with the integrated AJAX stuff.
I'm wondering about how user controls work in ASP.NET MVC. We have tons of .ASCX controls, and a few composite controls. When I work with web designers it is very easy to get them to use ASCX controls effectively, even without any programming knowledge, so that's a definite plus. But then of course the downsides are the page lifecycle, which can be maddening, and the fact that ASCX controls are hard to share between different projects. Composite controls are share-able, but basically a black box to a designer.
What's the model in ASP.NET MVC? Is there a way to create controls that solves the problems we've dealt with using ASCX and composite controls? Allowing easy access for web designers without having to worry about code being broken is an important consideration. | 0 |
41,724 | 09/03/2008 14:00:51 | 3,717 | 08/30/2008 09:44:24 | 379 | 20 | What is a DSL and where should I use it? | I'm hearing more and more about domain specific languages being thrown about and how they change the way you treat business logic, and I've seen Ayende's blog posts and things, but I've never really gotten exactly why I would take my business logic away from the methods and situations I'm using in my provider.
If you've got some background using these things, any chance you could put it in real laymans terms:
- What exactly building DSLs means?
- What languages are you using?
- Where using a DSL makes sense?
- What is the benefit of using DSLs? | theory | dsl | null | null | null | null | open | What is a DSL and where should I use it?
===
I'm hearing more and more about domain specific languages being thrown about and how they change the way you treat business logic, and I've seen Ayende's blog posts and things, but I've never really gotten exactly why I would take my business logic away from the methods and situations I'm using in my provider.
If you've got some background using these things, any chance you could put it in real laymans terms:
- What exactly building DSLs means?
- What languages are you using?
- Where using a DSL makes sense?
- What is the benefit of using DSLs? | 0 |
41,733 | 09/03/2008 14:04:08 | 1,008 | 08/11/2008 12:53:05 | 125 | 12 | Best way to sort an array in delphi | Say I have an array of records which I want to sort based on one of the fields in the record. What's the best way to achieve this?
TExample = record
SortOrder : integer;
SomethingElse : string;
end;
var SomeVar : array of TExample;
| delphi | arrays | sorting | null | null | null | open | Best way to sort an array in delphi
===
Say I have an array of records which I want to sort based on one of the fields in the record. What's the best way to achieve this?
TExample = record
SortOrder : integer;
SomethingElse : string;
end;
var SomeVar : array of TExample;
| 0 |
41,752 | 09/03/2008 14:13:45 | 230 | 08/03/2008 19:32:46 | 484 | 33 | NHibernate Generators | What is the best tool for generating Entity Class and/or hbm files and/or sql script for NHibernate.
This list below is from http://www.hibernate.org/365.html, which is the best any why?
* Moregen Free, Open Source (GPL) O/R Generator that can merge into existing Visual Studio Projects. Also merges changes to generated classes.
* NConstruct Lite Free tool for generating NHibernate O/R mapping source code. Different databases support (Microsoft SQL Server, Oracle, Access).
* GENNIT NHibernate Code Generator Free/Commercial Web 2.0 code generation of NHibernate code using WYSIWYG online UML designer.
* GenWise Studio with NHibernate Template Commercial product; Imports your existing database and generates all XML and Classes, including factories. It can also generate a asp.net web-application for your NHibernate BO-Layer automatically.
* HQL Analyzer and hbm.xml GUI Editor
* ObjectMapper by Mats Helander is a mapping GUI with NHibernate support
* MyGeneration is a template-based code generator GUI. Its template library includes templates for generating mapping files and classes from a database.
* AndroMDA is an open-source code generation framework that uses Model Driven Architecture (MDA) to transform UML models into deployable components. It supports generation of data access layers that use NHibernate as their persistence framework.
* CodeSmith Template for NH
* NHibernate Helper Kit is a VS2005 add-in to generate classes and mapping files.
* NConstruct - Intelligent Software Factory Commercial product; Full .NET C# source code generation for all tiers of the information system trough simple wizard procedure. O/R mapping based on NHibernate. For both WinForms and ASP.NET 2.0. | nhibernate | null | null | null | null | 01/30/2012 22:33:39 | not constructive | NHibernate Generators
===
What is the best tool for generating Entity Class and/or hbm files and/or sql script for NHibernate.
This list below is from http://www.hibernate.org/365.html, which is the best any why?
* Moregen Free, Open Source (GPL) O/R Generator that can merge into existing Visual Studio Projects. Also merges changes to generated classes.
* NConstruct Lite Free tool for generating NHibernate O/R mapping source code. Different databases support (Microsoft SQL Server, Oracle, Access).
* GENNIT NHibernate Code Generator Free/Commercial Web 2.0 code generation of NHibernate code using WYSIWYG online UML designer.
* GenWise Studio with NHibernate Template Commercial product; Imports your existing database and generates all XML and Classes, including factories. It can also generate a asp.net web-application for your NHibernate BO-Layer automatically.
* HQL Analyzer and hbm.xml GUI Editor
* ObjectMapper by Mats Helander is a mapping GUI with NHibernate support
* MyGeneration is a template-based code generator GUI. Its template library includes templates for generating mapping files and classes from a database.
* AndroMDA is an open-source code generation framework that uses Model Driven Architecture (MDA) to transform UML models into deployable components. It supports generation of data access layers that use NHibernate as their persistence framework.
* CodeSmith Template for NH
* NHibernate Helper Kit is a VS2005 add-in to generate classes and mapping files.
* NConstruct - Intelligent Software Factory Commercial product; Full .NET C# source code generation for all tiers of the information system trough simple wizard procedure. O/R mapping based on NHibernate. For both WinForms and ASP.NET 2.0. | 4 |
41,763 | 09/03/2008 14:18:45 | 4,393 | 09/03/2008 13:08:37 | 1 | 1 | What is the best way to calculate Age using Flex? | What is the best way to calculate Age using Flex? | flex | calculation | null | null | null | null | open | What is the best way to calculate Age using Flex?
===
What is the best way to calculate Age using Flex? | 0 |
41,766 | 09/03/2008 14:19:55 | 2,858 | 08/25/2008 15:42:32 | 18 | 0 | How do I download code using SVN/Tortoise from Google Code? | I just saw a really cool WPF twitter client that I think is developed by the Herding Code podcast guys [HerdingCode][1] called [Witty][2]. (or at least, I see a lot of those guys using this client). This project is currently posted up on Google Code.
Many of the projects on Google Code use Subversion as the version control system (including Witty). Having never used Subversion, I'm not sure what to do to download the code.
On the source page for this project ([google code witty source][3]) it gives the following instruction:
**Non-members may check out a read-only working copy anonymously over HTTP.** <br>
***svn checkout http://wittytwitter.googlecode.com/svn/trunk/ wittytwitter-read-only***
I'm confused as to where I am supposed to enter the above command so that I can download the code.
I have installed SVN and Tortoise (which I know almost nothing about).
Thanks for any help or simply pointing me in the right direction.
...Ed (@emcpadden)
[1]: http://www.herdingcode.com/
[2]: http://code.google.com/p/wittytwitter/
[3]: http://code.google.com/p/wittytwitter/source/checkout | svn | wpf | tortoisesvn | twitter | google-code | null | open | How do I download code using SVN/Tortoise from Google Code?
===
I just saw a really cool WPF twitter client that I think is developed by the Herding Code podcast guys [HerdingCode][1] called [Witty][2]. (or at least, I see a lot of those guys using this client). This project is currently posted up on Google Code.
Many of the projects on Google Code use Subversion as the version control system (including Witty). Having never used Subversion, I'm not sure what to do to download the code.
On the source page for this project ([google code witty source][3]) it gives the following instruction:
**Non-members may check out a read-only working copy anonymously over HTTP.** <br>
***svn checkout http://wittytwitter.googlecode.com/svn/trunk/ wittytwitter-read-only***
I'm confused as to where I am supposed to enter the above command so that I can download the code.
I have installed SVN and Tortoise (which I know almost nothing about).
Thanks for any help or simply pointing me in the right direction.
...Ed (@emcpadden)
[1]: http://www.herdingcode.com/
[2]: http://code.google.com/p/wittytwitter/
[3]: http://code.google.com/p/wittytwitter/source/checkout | 0 |
41,781 | 09/03/2008 14:25:04 | 4,403 | 09/03/2008 14:11:22 | 1 | 0 | Microsoft T-SQL to Oracle PL/SQL translation | I've worked with T-SQL for years but i've just moved to an organisation that is going to require writing some Oracle stuff, probably just simple CRUD operations at least until I find my feet. Is there are tool or utility avialable to easily translate T-SQL into PL/SQL, a keyword mapper is the sort of thing I'm looking for.
P.S. I'm too lazy to RTFM, besides it's not going to be a big part of my role so I just want something to get me up to speed a little faster.
| oracle | plsql | tsql | sql | null | null | open | Microsoft T-SQL to Oracle PL/SQL translation
===
I've worked with T-SQL for years but i've just moved to an organisation that is going to require writing some Oracle stuff, probably just simple CRUD operations at least until I find my feet. Is there are tool or utility avialable to easily translate T-SQL into PL/SQL, a keyword mapper is the sort of thing I'm looking for.
P.S. I'm too lazy to RTFM, besides it's not going to be a big part of my role so I just want something to get me up to speed a little faster.
| 0 |
41,785 | 09/03/2008 14:25:57 | 145 | 08/02/2008 14:40:17 | 793 | 25 | Learning Resources on Parsers, Interpreters, and Compilers | I've been wanting to play around with writing my own language for a while now (ostensibly for the learning experience) and as such need to be relatively grounded in the construction of Parsers, Interpreters, and Compilers. So:
- **Does anyone know of any good resources on constructing Parsers, Interpreters, and Compilers?**
EDIT: I'm not looking for compiler-compilers/parser-compilers such as Lex, Yacc and Bison... | compiler-theory | compiler | interpreter | parser | language-theory | null | open | Learning Resources on Parsers, Interpreters, and Compilers
===
I've been wanting to play around with writing my own language for a while now (ostensibly for the learning experience) and as such need to be relatively grounded in the construction of Parsers, Interpreters, and Compilers. So:
- **Does anyone know of any good resources on constructing Parsers, Interpreters, and Compilers?**
EDIT: I'm not looking for compiler-compilers/parser-compilers such as Lex, Yacc and Bison... | 0 |
41,792 | 09/03/2008 14:28:57 | 3,619 | 08/29/2008 15:08:14 | 118 | 20 | Instance constructor sets a static member, is it thread safe? | I am refactoring some code and am wondering about the use of a 'lock' in the instance constructor.
private static Int32 counter = 0;
private Int32 myCount;
public MyClass()
{
lock(this)
{
counter++;
myCount = counter;
}
}
Please confirm
1. Instance constructors are thread-safe.
2. The lock statement prevents access to that code block, not to the static 'counter' member.
If the intent of the original programmer were to have each instance know its 'count', how would I synchronize access to the 'counter' member to ensure that another thread isn't new'ing a 'MyClass' and changing the count before this one sets its count? | .net | thread-safety | null | null | null | null | open | Instance constructor sets a static member, is it thread safe?
===
I am refactoring some code and am wondering about the use of a 'lock' in the instance constructor.
private static Int32 counter = 0;
private Int32 myCount;
public MyClass()
{
lock(this)
{
counter++;
myCount = counter;
}
}
Please confirm
1. Instance constructors are thread-safe.
2. The lock statement prevents access to that code block, not to the static 'counter' member.
If the intent of the original programmer were to have each instance know its 'count', how would I synchronize access to the 'counter' member to ensure that another thread isn't new'ing a 'MyClass' and changing the count before this one sets its count? | 0 |
41,796 | 09/03/2008 14:31:11 | 4,398 | 09/03/2008 13:51:01 | 1 | 0 | Recommendation for 3rd party editing/syntax highlighting control - WinForms. | I'm looking for a quality WinForms component that supports syntax highlighting, code folding and the like. The key criteria are:
1) Stability
2) Value (price)
3) Ability to easily customize syntax to highlight
4) Light weight | .net | winforms | components | null | null | null | open | Recommendation for 3rd party editing/syntax highlighting control - WinForms.
===
I'm looking for a quality WinForms component that supports syntax highlighting, code folding and the like. The key criteria are:
1) Stability
2) Value (price)
3) Ability to easily customize syntax to highlight
4) Light weight | 0 |
41,799 | 09/03/2008 14:32:37 | 572 | 08/06/2008 20:56:54 | 2,734 | 209 | Recommended resources for computer science theory. | When I return to university in December (I'm on an internship now), I'll be taking a course in Computer Science theory. However, I'm not a very theoretical person, and abstract concepts have been difficult.
This course will cover topics such as regular, context-free and computable (recursive) languages with finite state machines, pushdown automata and turing machines along with the basic concepts of computability theory and NP-theory.
I have downloaded JFlap (an automata simulator application) and read Wikipedia, but what other resources cover topics such as this? I'm thinking it might also be a good idea to brush up on my discrete mathematics, so I'll be using that book, but discrete mathematics resources would also be appreciated. | computer-science-theory | computer-science | education | null | null | null | open | Recommended resources for computer science theory.
===
When I return to university in December (I'm on an internship now), I'll be taking a course in Computer Science theory. However, I'm not a very theoretical person, and abstract concepts have been difficult.
This course will cover topics such as regular, context-free and computable (recursive) languages with finite state machines, pushdown automata and turing machines along with the basic concepts of computability theory and NP-theory.
I have downloaded JFlap (an automata simulator application) and read Wikipedia, but what other resources cover topics such as this? I'm thinking it might also be a good idea to brush up on my discrete mathematics, so I'll be using that book, but discrete mathematics resources would also be appreciated. | 0 |
41,807 | 09/03/2008 14:34:38 | 4,161 | 09/02/2008 07:55:46 | 198 | 4 | Best (functional?) programming language to learn coming from Mathematica | As a mechanical engineering PhD student, I haven't had a great pedigree in programming as part of my “day job”. I started out in Matlab (having written some Hypercard and Applescript back in the day, and being introduced to Ada, of all things, in my 1st undergrad year), learned to program—if you can call it that—in (La)TeX; and finally discovered and fell for Mathematica.
Now I'm interested in learning a "real" programming language that I can enjoy in the same sort of style as Mathematica, which tries to stress functional programming since it seems to map more nicely to how certain kinds of mathematics can be written algorithmically.
So which functional language should I learn? I guess the obvious answer is “as many as possible”, but let's start out humble and give a single, well-considered option a good crack. I've heard good things about, say, Haskell and Scala, but I wonder if (given my non–computer science background) I'd be better off starting in more “grounded” territory and going with Ruby or Python (the latter having the big advantage of being used for [Sage](http://www.sagemath.org/), which I'd also like to investigate…after my PhD).
Well, I guess this is pretty subjective, so perhaps I could rephrase: would it be better to start looking at Haskell (say) straight after an ad-hoc education to functional programming in Mathematica, or will I get more out of learning Python (say) first? | functional-programming | null | null | null | null | null | open | Best (functional?) programming language to learn coming from Mathematica
===
As a mechanical engineering PhD student, I haven't had a great pedigree in programming as part of my “day job”. I started out in Matlab (having written some Hypercard and Applescript back in the day, and being introduced to Ada, of all things, in my 1st undergrad year), learned to program—if you can call it that—in (La)TeX; and finally discovered and fell for Mathematica.
Now I'm interested in learning a "real" programming language that I can enjoy in the same sort of style as Mathematica, which tries to stress functional programming since it seems to map more nicely to how certain kinds of mathematics can be written algorithmically.
So which functional language should I learn? I guess the obvious answer is “as many as possible”, but let's start out humble and give a single, well-considered option a good crack. I've heard good things about, say, Haskell and Scala, but I wonder if (given my non–computer science background) I'd be better off starting in more “grounded” territory and going with Ruby or Python (the latter having the big advantage of being used for [Sage](http://www.sagemath.org/), which I'd also like to investigate…after my PhD).
Well, I guess this is pretty subjective, so perhaps I could rephrase: would it be better to start looking at Haskell (say) straight after an ad-hoc education to functional programming in Mathematica, or will I get more out of learning Python (say) first? | 0 |
41,824 | 09/03/2008 14:42:12 | 4,215 | 09/02/2008 11:07:44 | 18 | 2 | How do I prevent the closing of modal popup window(ModalPopupExtender) on postback? | I'm using Microsoft AjaxControlToolkit for modal popup window.
And on a modal popup window, when a postback occured, the window was closing. How do i prevent from the closing action of the modal popup? | asp.net | ajaxtoolkit | null | null | null | null | open | How do I prevent the closing of modal popup window(ModalPopupExtender) on postback?
===
I'm using Microsoft AjaxControlToolkit for modal popup window.
And on a modal popup window, when a postback occured, the window was closing. How do i prevent from the closing action of the modal popup? | 0 |
41,832 | 09/03/2008 14:45:16 | 3,848 | 08/31/2008 11:24:27 | 31 | 4 | Maintain the correct version for a COM dll referenced in a .NET project | I want to reference a COM DLL in a .NET project, but I also want to make sure that the interop DLL created will have the correct version (so that patches will know when the DLL must be changed).
If I use TlbImp I can specify the required version with the */asmversion* flag but when I add it directly from VisualStudio it gets a version that has nothing to do with the original COM DLL's version.
I tried changing the version in the vcproj file
<ItemGroup>
<COMReference Include="MYDLLLib">
<Guid>{459F8813-D74D-DEAD-BEEF-00CAFEBABEA5}</Guid>
<!-- I changed this -->
<VersionMajor>1</VersionMajor>
<!-- This too -->
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
</ItemGroup>
But then the project failed to build with the following error:
> error CS0246: The type or namespace name 'MYDLLLib' could not be found (are you missing a using directive or an assembly reference?)
Is there any way to get this done without creating all my COM references with TlbImp in advance?
If the answer is **yes** is there a way to specify a build number in addition to the major an minor versions? (e.g 1.2.**42**)
Thanks, Motti.
| com | .net | c++ | null | null | null | open | Maintain the correct version for a COM dll referenced in a .NET project
===
I want to reference a COM DLL in a .NET project, but I also want to make sure that the interop DLL created will have the correct version (so that patches will know when the DLL must be changed).
If I use TlbImp I can specify the required version with the */asmversion* flag but when I add it directly from VisualStudio it gets a version that has nothing to do with the original COM DLL's version.
I tried changing the version in the vcproj file
<ItemGroup>
<COMReference Include="MYDLLLib">
<Guid>{459F8813-D74D-DEAD-BEEF-00CAFEBABEA5}</Guid>
<!-- I changed this -->
<VersionMajor>1</VersionMajor>
<!-- This too -->
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
</ItemGroup>
But then the project failed to build with the following error:
> error CS0246: The type or namespace name 'MYDLLLib' could not be found (are you missing a using directive or an assembly reference?)
Is there any way to get this done without creating all my COM references with TlbImp in advance?
If the answer is **yes** is there a way to specify a build number in addition to the major an minor versions? (e.g 1.2.**42**)
Thanks, Motti.
| 0 |
41,836 | 09/03/2008 14:47:35 | 319 | 08/04/2008 16:03:00 | 57 | 5 | Setting include path in PHP intermittently fails. Why? | I have tried both
ini_set('include_path', '.:.:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes');
in the code itself and also
php_value include_path ".:.:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes"
in the .htaccess file.
Both methods actually **do work** but only intermittently. That is, they will work fine for about 37 pages requests and then fail about 42 pages requests resulting in an require() call to cause a fatal error effectively crashing the site.
I'm not even sure where to begin trying to find out what is going on!
| php | null | null | null | null | null | open | Setting include path in PHP intermittently fails. Why?
===
I have tried both
ini_set('include_path', '.:.:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes');
in the code itself and also
php_value include_path ".:.:/usr/share/php5:/usr/share/php5/PEAR:lib:app/classes"
in the .htaccess file.
Both methods actually **do work** but only intermittently. That is, they will work fine for about 37 pages requests and then fail about 42 pages requests resulting in an require() call to cause a fatal error effectively crashing the site.
I'm not even sure where to begin trying to find out what is going on!
| 0 |
41,837 | 09/03/2008 14:47:52 | 1,154 | 08/12/2008 23:39:07 | 313 | 37 | Cost of Inserts vs Update in SQL Server | I have a table with more than a millons rows. This table is use to index Tiff Images. Each image have fields like date, number, etc. I have users that index this images in batch of 500. I need to know if it is better to insert first 500 and then 500 updates or when the user ends do the 500 insert with all the data. A very important thing is that if I do the 500 inserts at first this time is free for me because I can do it the night before.
So the question is: Is better to do Inserts or Updates and why? I have define a Id value for each image, I have other index on the fields. | sql-server | null | null | null | null | null | open | Cost of Inserts vs Update in SQL Server
===
I have a table with more than a millons rows. This table is use to index Tiff Images. Each image have fields like date, number, etc. I have users that index this images in batch of 500. I need to know if it is better to insert first 500 and then 500 updates or when the user ends do the 500 insert with all the data. A very important thing is that if I do the 500 inserts at first this time is free for me because I can do it the night before.
So the question is: Is better to do Inserts or Updates and why? I have define a Id value for each image, I have other index on the fields. | 0 |
41,838 | 09/03/2008 14:48:16 | 3,430 | 08/28/2008 14:49:22 | 1 | 0 | Black Box testing software | We are about to get a canned package in that has been modified to our needs. I am part of the team setup to prepare tests for it. It has an Oracle back end and I believe it's written in C++ .NET.
My question is what free or open source testing tools would you recommend.
Thanks
Ken | testing | oracle | blackbox | null | null | null | open | Black Box testing software
===
We are about to get a canned package in that has been modified to our needs. I am part of the team setup to prepare tests for it. It has an Oracle back end and I believe it's written in C++ .NET.
My question is what free or open source testing tools would you recommend.
Thanks
Ken | 0 |
41,839 | 09/03/2008 14:48:48 | 511 | 08/06/2008 13:22:48 | 21 | 6 | What is a good markup language to use for tests? | I'm writing a tool to run a series of integration tests on my product. It will install it and then run a bunch of commands against it to make sure its doing what it is supposed to. I'm exploring different options for how to markup the commands for each test case and wondering if folks had insight to share on this. I'm thinking of using YAML and doing something like this (kinda adapted from rails fixtures):
<pre>
case:
name: caseN
description: this tests foo to make sure bar happens
expected_results: bar should happen
commands: |
command to run
next command to run
verification: command to see if it worked
</pre>
Does anyone have another, or better idea? Or is there a domain specific language I'm unaware of?
Thanks! | testing | integration-testing | null | null | null | null | open | What is a good markup language to use for tests?
===
I'm writing a tool to run a series of integration tests on my product. It will install it and then run a bunch of commands against it to make sure its doing what it is supposed to. I'm exploring different options for how to markup the commands for each test case and wondering if folks had insight to share on this. I'm thinking of using YAML and doing something like this (kinda adapted from rails fixtures):
<pre>
case:
name: caseN
description: this tests foo to make sure bar happens
expected_results: bar should happen
commands: |
command to run
next command to run
verification: command to see if it worked
</pre>
Does anyone have another, or better idea? Or is there a domain specific language I'm unaware of?
Thanks! | 0 |
41,842 | 09/03/2008 14:50:03 | 3,615 | 08/29/2008 14:57:54 | 16 | 0 | PDB files for production app and the "Optimize code" flag | When should I include PDB files for a production release? Should I use the "Optimize code" flag and how would that affect the information I get from an exception?
If there is a noticable performance benefit I would want to use the optimizations but if not I'd rather have accurate debugging info. What is typically done for a production app?
| c# | visual-studio | null | null | null | null | open | PDB files for production app and the "Optimize code" flag
===
When should I include PDB files for a production release? Should I use the "Optimize code" flag and how would that affect the information I get from an exception?
If there is a noticable performance benefit I would want to use the optimizations but if not I'd rather have accurate debugging info. What is typically done for a production app?
| 0 |
41,869 | 09/03/2008 15:01:53 | 2,831 | 08/25/2008 12:57:22 | 1 | 0 | Is SQL Server Bulk Insert Transactional? | If I run the following query in SQL Server 2000 Query Analyzer:
BULK INSERT OurTable
FROM 'c:\OurTable.txt'
WITH (CODEPAGE = 'RAW', DATAFILETYPE = 'char', FIELDTERMINATOR = '\t', ROWS_PER_BATCH = 10000, TABLOCK)
On a text file that conforms to OurTable's schema for 40 lines, but then changes format for the last 20 lines (lets say the last 20 lines have fewer fields), I receive an error. However, the first 40 lines are committed to the table. Is there something about the way I'm calling Bulk Insert that makes it not be transactional, or do I need to do something explicit to force it to rollback on failure? | sql-server | transactions | bulkinsert | null | null | null | open | Is SQL Server Bulk Insert Transactional?
===
If I run the following query in SQL Server 2000 Query Analyzer:
BULK INSERT OurTable
FROM 'c:\OurTable.txt'
WITH (CODEPAGE = 'RAW', DATAFILETYPE = 'char', FIELDTERMINATOR = '\t', ROWS_PER_BATCH = 10000, TABLOCK)
On a text file that conforms to OurTable's schema for 40 lines, but then changes format for the last 20 lines (lets say the last 20 lines have fewer fields), I receive an error. However, the first 40 lines are committed to the table. Is there something about the way I'm calling Bulk Insert that makes it not be transactional, or do I need to do something explicit to force it to rollback on failure? | 0 |
41,880 | 09/03/2008 15:06:02 | 91 | 08/01/2008 17:55:22 | 5,435 | 234 | JavaScript IDEs | Yay, another "What is the Best IDE"-Question, but this time it's for a language that does not seem to have any really popular yet: JavaScript.
With an IDE, I mean the full set: Writing Code with Syntax Highlighting and possibly "IntelliSense" Code Completion Helper, but also debugging including Breakpoint and Watches (also for AJAX Stuff), possibly even with support to run the code in multiple Browsers.
My current approach of "Writing JS in Notepad and using Firefox' Error Console and Firebug" is not really statisfying... | javascript | null | null | null | null | 09/03/2011 23:49:45 | not constructive | JavaScript IDEs
===
Yay, another "What is the Best IDE"-Question, but this time it's for a language that does not seem to have any really popular yet: JavaScript.
With an IDE, I mean the full set: Writing Code with Syntax Highlighting and possibly "IntelliSense" Code Completion Helper, but also debugging including Breakpoint and Watches (also for AJAX Stuff), possibly even with support to run the code in multiple Browsers.
My current approach of "Writing JS in Notepad and using Firefox' Error Console and Firebug" is not really statisfying... | 4 |
41,894 | 09/03/2008 15:11:01 | 823 | 08/09/2008 05:00:46 | 146 | 7 | $0 (Program Name) in Java? | Is there a way to find the name of the program that is running in Java. The class of the main method would be good enough.
| java | program | name | null | null | null | open | $0 (Program Name) in Java?
===
Is there a way to find the name of the program that is running in Java. The class of the main method would be good enough.
| 0 |
41,898 | 09/03/2008 15:12:38 | 572 | 08/06/2008 20:56:54 | 2,744 | 211 | How do you choose an open-source license? | I'm a software engineer, not a lawyer, and my university doesn't offer any courses geared toward licensing software. In fact, their law-related courses are lacking (but slowly growing in number). Where can I go to learn about open-source licenses and how to choose them? | open-source | licensing | null | null | null | null | open | How do you choose an open-source license?
===
I'm a software engineer, not a lawyer, and my university doesn't offer any courses geared toward licensing software. In fact, their law-related courses are lacking (but slowly growing in number). Where can I go to learn about open-source licenses and how to choose them? | 0 |
41,908 | 09/03/2008 15:15:24 | 3,111 | 08/26/2008 17:47:14 | 23 | 3 | Customizing Visual Studio | I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#) for several months now. For the most part my IDE is set up fairly standard but I have been wondering what are some suggestions in terms of plugins/settings that you find to be the most useful? | c# | asp.net | visual-studio | winforms | null | null | open | Customizing Visual Studio
===
I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#) for several months now. For the most part my IDE is set up fairly standard but I have been wondering what are some suggestions in terms of plugins/settings that you find to be the most useful? | 0 |
41,925 | 09/03/2008 15:22:33 | 1,219 | 08/13/2008 13:44:47 | 1,662 | 115 | Is there a standard for storing normalized phone numbers in a database? | What is a good data structure for storing phone numbers in database fields? I'm looking for something that is flexible enough to handle international numbers, and also something that allows the various parts of the number to be queried efficiently. | database | null | null | null | null | null | open | Is there a standard for storing normalized phone numbers in a database?
===
What is a good data structure for storing phone numbers in database fields? I'm looking for something that is flexible enough to handle international numbers, and also something that allows the various parts of the number to be queried efficiently. | 0 |
41,928 | 09/03/2008 15:23:16 | 192 | 08/03/2008 10:15:38 | 278 | 27 | LightWindow & IE7, "Line 444 - object does not support this property or method" | I have just received and bypassed a problem with LightWindow and IE7 where, on page load, it throws a JavaScript error on line 444 of lightwindow.js, claiming that the "object does not support this property or method". Despite finding various postings on various forums, no Google result I could find had a solution, so I am posting this here in the hopes that it will help someone / myself later.
Many suggested a specific order of the script files but I was already using this order (prototype, scriptaculous, lightwindow).
These are the steps I took that seemed to finally work, I write them here only as a record as I do not know nor have time to test which ones specifically "fixed" the issue:
1. Moved the call to lightwindow.js to the bottom of the page.
2. Changed line 444 to: if (this._getGalleryInfo(link.rel)) {
3. Changed line 1157 to: if (this._getGalleryInfo(this.element.rel)) {
4. Finally, I enclosed (and this is dirty, my apologies) lines 1417 to 1474 with a try/catch block, swallowing the exception.
It's not a very nice fix, but my page (which contains a lightwindow link with no "rel" tag, several lightwindow links which do have "rel" tags, and one "inline" link) works just fine in IE7 now. Please comment if you have anything to add about this issue or problems with / improvements to my given solution. | lightwindow | line-444 | null | null | null | null | open | LightWindow & IE7, "Line 444 - object does not support this property or method"
===
I have just received and bypassed a problem with LightWindow and IE7 where, on page load, it throws a JavaScript error on line 444 of lightwindow.js, claiming that the "object does not support this property or method". Despite finding various postings on various forums, no Google result I could find had a solution, so I am posting this here in the hopes that it will help someone / myself later.
Many suggested a specific order of the script files but I was already using this order (prototype, scriptaculous, lightwindow).
These are the steps I took that seemed to finally work, I write them here only as a record as I do not know nor have time to test which ones specifically "fixed" the issue:
1. Moved the call to lightwindow.js to the bottom of the page.
2. Changed line 444 to: if (this._getGalleryInfo(link.rel)) {
3. Changed line 1157 to: if (this._getGalleryInfo(this.element.rel)) {
4. Finally, I enclosed (and this is dirty, my apologies) lines 1417 to 1474 with a try/catch block, swallowing the exception.
It's not a very nice fix, but my page (which contains a lightwindow link with no "rel" tag, several lightwindow links which do have "rel" tags, and one "inline" link) works just fine in IE7 now. Please comment if you have anything to add about this issue or problems with / improvements to my given solution. | 0 |
41,934 | 09/03/2008 15:27:19 | 823 | 08/09/2008 05:00:46 | 148 | 7 | How can I make Eclipse file search not include svn directories? | When I do a file search on eclipse it includes the .svn directories by default. I tried excluding them from the build path but they still appear on file search results. | svn | eclipse | null | null | null | null | open | How can I make Eclipse file search not include svn directories?
===
When I do a file search on eclipse it includes the .svn directories by default. I tried excluding them from the build path but they still appear on file search results. | 0 |
41,937 | 09/03/2008 15:29:24 | 1,958 | 08/19/2008 15:28:47 | 44 | 14 | Converting latitude/longitude to Alberta 10 TM Projection | I need to convert latitude/longitude coordinates into Easting/Northing coordinates in the Alberta 10 TM Projection.
The 10 TM projection is similar to UTM, but it is a custom projection for the province of Alberta, Canada. I think (with some effort) I could code it myself but would rather not reinvent the wheel if it's been done already. | latitude | longitude | null | null | null | null | open | Converting latitude/longitude to Alberta 10 TM Projection
===
I need to convert latitude/longitude coordinates into Easting/Northing coordinates in the Alberta 10 TM Projection.
The 10 TM projection is similar to UTM, but it is a custom projection for the province of Alberta, Canada. I think (with some effort) I could code it myself but would rather not reinvent the wheel if it's been done already. | 0 |
41,948 | 09/03/2008 15:34:39 | 2,688 | 08/24/2008 14:48:05 | 697 | 26 | How do I get the difference between two Dates in JavaScript? | I'm creating an application which lets you define events with a time frame. I want to automatically fill in the end date when the user selects or changes the start date. I can't quite figure out, however, how to get the difference between the two times, and then how to create a new end Date using that difference. | javascript | date | null | null | null | null | open | How do I get the difference between two Dates in JavaScript?
===
I'm creating an application which lets you define events with a time frame. I want to automatically fill in the end date when the user selects or changes the start date. I can't quite figure out, however, how to get the difference between the two times, and then how to create a new end Date using that difference. | 0 |
41,963 | 09/03/2008 15:43:42 | 2,970 | 08/26/2008 09:17:47 | 1 | 0 | Are there any version control systems for 3d models / 3d data? | Well the subject is the question basically. Are there any version control systems out there for 3d models. An open source approach would be preferred of course.
I am looking for functionality along the lines of subversion however more basic systems would be of interest as well. Basic operations like branching / merging / commit should be available in one form or another. | version-control | null | null | null | null | null | open | Are there any version control systems for 3d models / 3d data?
===
Well the subject is the question basically. Are there any version control systems out there for 3d models. An open source approach would be preferred of course.
I am looking for functionality along the lines of subversion however more basic systems would be of interest as well. Basic operations like branching / merging / commit should be available in one form or another. | 0 |
41,969 | 09/03/2008 15:47:23 | 3,002 | 08/26/2008 11:21:07 | 752 | 25 | Standard way to open a folder window in linux? | I want to open a folder window, in the appropriate file manager, from within a cross-platform (windows/mac/linux) Python application.
On OSX, I can open a window in the finder with
os.system('open %s' % foldername)
and on Windows with
os.startfile(foldername)
What about unix/linux? Is there a standard way to do this or do I have to special case gnome/kde/etc and manually run the appropriate application (nautilus/konqueror/etc)? | python | linux | cross-platform | desktop | null | null | open | Standard way to open a folder window in linux?
===
I want to open a folder window, in the appropriate file manager, from within a cross-platform (windows/mac/linux) Python application.
On OSX, I can open a window in the finder with
os.system('open %s' % foldername)
and on Windows with
os.startfile(foldername)
What about unix/linux? Is there a standard way to do this or do I have to special case gnome/kde/etc and manually run the appropriate application (nautilus/konqueror/etc)? | 0 |
41,970 | 09/03/2008 15:49:20 | 1,196 | 08/13/2008 12:33:04 | 1,372 | 91 | Lightweight fuzzy search library | Can you suggest some light weight fuzzy text search library?
What I want to do is to allow users to find correct data for search terms with typos.
I could use full-text search engines like Lucene, but I think it's an overkill. | fuzzy-search | null | null | null | null | null | open | Lightweight fuzzy search library
===
Can you suggest some light weight fuzzy text search library?
What I want to do is to allow users to find correct data for search terms with typos.
I could use full-text search engines like Lucene, but I think it's an overkill. | 0 |
41,988 | 09/03/2008 15:57:56 | 2,894 | 08/25/2008 20:06:55 | 310 | 38 | How to get kids into programming | I have a seven year old son. He is pretty bright and I want to show him that computers are good for something beyond playing games. My end goal would be to have him use a language (See [Related question][1]) to develop a program he can show his friends or solve a problem.
My question is how do I get started? I am fairly certain I will have to use a more viusal language such as [Alice][2] but how do I go from playing "Mini Clips" to making his own thing? When do you know he is ready to go to more advanced languages? Any advice would be welcome!!
[1]: http://stackoverflow.com/questions/20059/suggestions-on-starting-a-child-programming
[2]: http://www.alice.org | alice | kids | null | null | null | 03/02/2012 17:28:24 | not constructive | How to get kids into programming
===
I have a seven year old son. He is pretty bright and I want to show him that computers are good for something beyond playing games. My end goal would be to have him use a language (See [Related question][1]) to develop a program he can show his friends or solve a problem.
My question is how do I get started? I am fairly certain I will have to use a more viusal language such as [Alice][2] but how do I go from playing "Mini Clips" to making his own thing? When do you know he is ready to go to more advanced languages? Any advice would be welcome!!
[1]: http://stackoverflow.com/questions/20059/suggestions-on-starting-a-child-programming
[2]: http://www.alice.org | 4 |
41,994 | 09/03/2008 16:00:08 | 3,294 | 08/27/2008 17:51:23 | 66 | 6 | Parsing an XML file in C# | What is the fastest method of parsing an XML file in C#? I'm using .Net 2.0 | c# | xml | null | null | null | null | open | Parsing an XML file in C#
===
What is the fastest method of parsing an XML file in C#? I'm using .Net 2.0 | 0 |
41,996 | 09/03/2008 16:01:01 | 4,239 | 09/02/2008 13:46:59 | 53 | 2 | How to display line breaks in SharePoint comment history field | We have a SharePoint list setup with history enabled so the Comments field keeps all the past values. When it displays, the Comments field is void of all line breaks. However, when SharePoint e-mails the change to us, the line breaks are in there. The Description field also shows the line breaks.
So, something must be stripping out the line breaks in the read-only view of the Comments field.
Any idea on how to customize that so it retains the formatting in the detail view of the SharePoint list item? | sharepoint | null | null | null | null | null | open | How to display line breaks in SharePoint comment history field
===
We have a SharePoint list setup with history enabled so the Comments field keeps all the past values. When it displays, the Comments field is void of all line breaks. However, when SharePoint e-mails the change to us, the line breaks are in there. The Description field also shows the line breaks.
So, something must be stripping out the line breaks in the read-only view of the Comments field.
Any idea on how to customize that so it retains the formatting in the detail view of the SharePoint list item? | 0 |
42,034 | 09/03/2008 16:13:06 | 577 | 08/06/2008 21:36:25 | 255 | 9 | What is a tuple useful for? | I am learning Python for a class now, and we just covered tuples as one of the data types. I read the Wikipedia page on it, but, I could not figure out where such a data type would be useful in practice. Can I have some examples, perhaps in Python, where an immutable set of numbers would be needed? How is this different from a list? | python | tuples | null | null | null | null | open | What is a tuple useful for?
===
I am learning Python for a class now, and we just covered tuples as one of the data types. I read the Wikipedia page on it, but, I could not figure out where such a data type would be useful in practice. Can I have some examples, perhaps in Python, where an immutable set of numbers would be needed? How is this different from a list? | 0 |
42,068 | 09/03/2008 16:30:12 | 3,636 | 08/29/2008 16:13:12 | 1 | 0 | How do I handle newlines in json? | I've generated some JSON and I'm trying to pull it into an object in javascript and I keep getting errors. Here's what I have:
var data = '{"count" : 1, "stack" : "sometext\n\n"}';
var dataObj = eval('('+data+')');
This gives me an error:
unterminated string literal
When I take out the \n after sometext the error goes away. I can't seem to figure out why the \n makes eval fail. | json | newline | null | null | null | null | open | How do I handle newlines in json?
===
I've generated some JSON and I'm trying to pull it into an object in javascript and I keep getting errors. Here's what I have:
var data = '{"count" : 1, "stack" : "sometext\n\n"}';
var dataObj = eval('('+data+')');
This gives me an error:
unterminated string literal
When I take out the \n after sometext the error goes away. I can't seem to figure out why the \n makes eval fail. | 0 |
42,070 | 09/03/2008 16:30:50 | 1,412 | 08/15/2008 15:05:57 | 524 | 38 | Why does the Bourne shell printf iterate over a %s argument? | What's going on here?
printf.sh:
#! /bin/sh
NAME="George W. Bush"
printf "Hello, %s\n" $NAME
Command line session:
$ ./printf.sh
Hello, George
Hello, W.
Hello, Bush | shell | unix | null | null | null | null | open | Why does the Bourne shell printf iterate over a %s argument?
===
What's going on here?
printf.sh:
#! /bin/sh
NAME="George W. Bush"
printf "Hello, %s\n" $NAME
Command line session:
$ ./printf.sh
Hello, George
Hello, W.
Hello, Bush | 0 |
42,071 | 09/03/2008 16:31:13 | 194 | 08/03/2008 10:56:49 | 2,092 | 144 | .NET YAML Library | Anyone know of a lightweight YAML library for .NET?
Preferably something that comes with source (in C#) so that I can compile it directly into my binary and not have yet another dll dependency. | c# | .net | yaml | null | null | null | open | .NET YAML Library
===
Anyone know of a lightweight YAML library for .NET?
Preferably something that comes with source (in C#) so that I can compile it directly into my binary and not have yet another dll dependency. | 0 |
42,076 | 09/03/2008 16:34:51 | 2,644 | 08/23/2008 21:56:47 | 477 | 38 | Are you human? (or How to prevent spam) | I'm defenetly sure this has been asked and I'm about to get down-voted, but searching "human" or "spam" doesn't return anything relevant. So, my question is:
**What mechanisms do you know that prevent your site fro being abused by anonymous spammers.**
For example, let's say that I have a site where people can vote something. But I *don't* want someone to spam something all the way to the top. So I found (a) creating an account and only allowed to vote once and (b) CAPTCHA to decrease spam. What other methods do you know and how good do they work? | spam | null | null | null | null | 07/20/2012 01:38:20 | not constructive | Are you human? (or How to prevent spam)
===
I'm defenetly sure this has been asked and I'm about to get down-voted, but searching "human" or "spam" doesn't return anything relevant. So, my question is:
**What mechanisms do you know that prevent your site fro being abused by anonymous spammers.**
For example, let's say that I have a site where people can vote something. But I *don't* want someone to spam something all the way to the top. So I found (a) creating an account and only allowed to vote once and (b) CAPTCHA to decrease spam. What other methods do you know and how good do they work? | 4 |
42,102 | 09/03/2008 16:44:59 | 4,249 | 09/02/2008 14:13:06 | 168 | 17 | Using different classloaders for different JUnit tests? | I have a Singleton/Factory object that I'd like to write a JUnit test for. The Factory method decides which implementing class to instantiate based upon a classname in a properties file on the classpath. If no properties file is found, or the properties file does not contain the classname key, then the class will instantiate a default implementing class.
Since the factory keeps a static instance of the Singleton to use once it has been instantiated, to be able to test the "failover" logic in the Factory method I would need to run each test method in a different classloader.
Is there any way with JUnit (or with another unit testing package) to do this?
edit: here is some of the Factory code that is in use:
private static MyClass myClassImpl = instantiateMyClass();
private static MyClass instantiateMyClass() {
MyClass newMyClass = null;
String className = null;
try {
Properties props = getProperties();
className = props.getProperty(PROPERTY_CLASSNAME_KEY);
if (className == null) {
log.warn("instantiateMyClass: Property [" + PROPERTY_CLASSNAME_KEY
+ "] not found in properties, using default MyClass class [" + DEFAULT_CLASSNAME + "]");
className = DEFAULT_CLASSNAME;
}
Class MyClassClass = Class.forName(className);
Object MyClassObj = MyClassClass.newInstance();
if (MyClassObj instanceof MyClass) {
newMyClass = (MyClass) MyClassObj;
}
}
catch (...) {
...
}
return newMyClass;
}
private static Properties getProperties() throws IOException {
Properties props = new Properties();
InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(PROPERTIES_FILENAME);
if (stream != null) {
props.load(stream);
}
else {
log.error("getProperties: could not load properties file [" + PROPERTIES_FILENAME + "] from classpath, file not found");
}
return props;
} | java | junit | unit-testing | null | null | null | open | Using different classloaders for different JUnit tests?
===
I have a Singleton/Factory object that I'd like to write a JUnit test for. The Factory method decides which implementing class to instantiate based upon a classname in a properties file on the classpath. If no properties file is found, or the properties file does not contain the classname key, then the class will instantiate a default implementing class.
Since the factory keeps a static instance of the Singleton to use once it has been instantiated, to be able to test the "failover" logic in the Factory method I would need to run each test method in a different classloader.
Is there any way with JUnit (or with another unit testing package) to do this?
edit: here is some of the Factory code that is in use:
private static MyClass myClassImpl = instantiateMyClass();
private static MyClass instantiateMyClass() {
MyClass newMyClass = null;
String className = null;
try {
Properties props = getProperties();
className = props.getProperty(PROPERTY_CLASSNAME_KEY);
if (className == null) {
log.warn("instantiateMyClass: Property [" + PROPERTY_CLASSNAME_KEY
+ "] not found in properties, using default MyClass class [" + DEFAULT_CLASSNAME + "]");
className = DEFAULT_CLASSNAME;
}
Class MyClassClass = Class.forName(className);
Object MyClassObj = MyClassClass.newInstance();
if (MyClassObj instanceof MyClass) {
newMyClass = (MyClass) MyClassObj;
}
}
catch (...) {
...
}
return newMyClass;
}
private static Properties getProperties() throws IOException {
Properties props = new Properties();
InputStream stream = Thread.currentThread().getContextClassLoader().getResourceAsStream(PROPERTIES_FILENAME);
if (stream != null) {
props.load(stream);
}
else {
log.error("getProperties: could not load properties file [" + PROPERTIES_FILENAME + "] from classpath, file not found");
}
return props;
} | 0 |
42,115 | 09/03/2008 17:03:35 | 1,889 | 08/19/2008 04:55:30 | 1 | 1 | App.config conenction string Protection error | I am running into an issue I had before but cant find my reference on how to solve it.
Here is the issue. We encrypt the connections strings section in the app.config for our client application using code below
config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None)
If config.ConnectionStrings.SectionInformation.IsProtected = False Then
config.ConnectionStrings.SectionInformation.ProtectSection(Nothing)
' We must save the changes to the configuration file.
config.Save(ConfigurationSaveMode.Modified, True)
End If
the issue is we had a salesperson leave and the laptop is going to new salesperson and under the new user's login when it tries to to do this we get an error. the error is:
Unhandled Exception: System.Configuration.ConfigurationErrorsException:
An error occurred executing the configuration section handler for connectionStrings. ---> System.Configuration.ConfigurationErrorsException: Failed to encrypt the section 'connectionStrings' using provider 'RsaProtectedConfigurationProvider'.
Error message from the provider: Object already exists.
---> System.Security.Cryptography.CryptographicException: Object already exists
| vb.net | cryptography | app-config | cryptographicexception | null | null | open | App.config conenction string Protection error
===
I am running into an issue I had before but cant find my reference on how to solve it.
Here is the issue. We encrypt the connections strings section in the app.config for our client application using code below
config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None)
If config.ConnectionStrings.SectionInformation.IsProtected = False Then
config.ConnectionStrings.SectionInformation.ProtectSection(Nothing)
' We must save the changes to the configuration file.
config.Save(ConfigurationSaveMode.Modified, True)
End If
the issue is we had a salesperson leave and the laptop is going to new salesperson and under the new user's login when it tries to to do this we get an error. the error is:
Unhandled Exception: System.Configuration.ConfigurationErrorsException:
An error occurred executing the configuration section handler for connectionStrings. ---> System.Configuration.ConfigurationErrorsException: Failed to encrypt the section 'connectionStrings' using provider 'RsaProtectedConfigurationProvider'.
Error message from the provider: Object already exists.
---> System.Security.Cryptography.CryptographicException: Object already exists
| 0 |
42,122 | 09/03/2008 17:06:40 | 194 | 08/03/2008 10:56:49 | 2,072 | 143 | Easy .NET XML Library | Following my question regarding a [.NET YAML Library](http://stackoverflow.com/questions/42071/net-yaml-library)... as there doesn't seem to be great support for YAML in .NET, are there and good open source *really simple* .NET XML libraries. I just want something where I can pass it a section name and a key and it gives me the value as well as being able to give me a list of all the current sections and keys.
Also, preferably something with a license that allows it to be used commercially. | .net | xml | null | null | null | null | open | Easy .NET XML Library
===
Following my question regarding a [.NET YAML Library](http://stackoverflow.com/questions/42071/net-yaml-library)... as there doesn't seem to be great support for YAML in .NET, are there and good open source *really simple* .NET XML libraries. I just want something where I can pass it a section name and a key and it gives me the value as well as being able to give me a list of all the current sections and keys.
Also, preferably something with a license that allows it to be used commercially. | 0 |
42,125 | 09/03/2008 17:08:18 | 3,807 | 08/30/2008 23:07:08 | 1 | 0 | function declaration isn't a prototype | I have a library I created,
mylib.c:
#include <mylib.h>
int
testlib() {
printf("Hello world\n");
return (0);
}
mylib.h:
#include <stdio.h>
extern int testlib();
In my program, I've attempted to call this library function:
myprogram.c:
#include <mylib.h>
int
main (int argc, char *argv[]) {
testlib();
return (0);
}
When I attempt to compile this program I get the following error:
In file included from myprogram.c:1
mylib.h:2 warning: function declaration isn't a prototype
I'm using: gcc (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)
My question is, what is the proper way to declare a function prototype? | c | compiler | gcc | null | null | null | open | function declaration isn't a prototype
===
I have a library I created,
mylib.c:
#include <mylib.h>
int
testlib() {
printf("Hello world\n");
return (0);
}
mylib.h:
#include <stdio.h>
extern int testlib();
In my program, I've attempted to call this library function:
myprogram.c:
#include <mylib.h>
int
main (int argc, char *argv[]) {
testlib();
return (0);
}
When I attempt to compile this program I get the following error:
In file included from myprogram.c:1
mylib.h:2 warning: function declaration isn't a prototype
I'm using: gcc (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)
My question is, what is the proper way to declare a function prototype? | 0 |
42,126 | 09/03/2008 17:08:35 | 3,114 | 08/26/2008 18:05:52 | 512 | 40 | C++ Compiler Error C2371 - Redefinition of WCHAR | I am getting C++ Compiler error C2371 when I include a header file that itself includes odbcss.h. My project is set to MBCS.
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\odbcss.h(430) : error C2371: 'WCHAR' : redefinition; different basic types
1> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(289) : see declaration of 'WCHAR'
I don't see any defines in odbcss.h that I could set to avoid this. Has anyone else seen this? | c++ | compiler | null | null | null | null | open | C++ Compiler Error C2371 - Redefinition of WCHAR
===
I am getting C++ Compiler error C2371 when I include a header file that itself includes odbcss.h. My project is set to MBCS.
C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\odbcss.h(430) : error C2371: 'WCHAR' : redefinition; different basic types
1> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(289) : see declaration of 'WCHAR'
I don't see any defines in odbcss.h that I could set to avoid this. Has anyone else seen this? | 0 |
42,143 | 09/03/2008 17:24:05 | 287 | 08/04/2008 12:43:38 | 249 | 19 | How does Google Chrome control/contain multiple processes? | How does Google Chrome command and control multiple cross platform processes and provide a shared window / rendering area?
Any insights? | google | chrome | process | null | null | null | open | How does Google Chrome control/contain multiple processes?
===
How does Google Chrome command and control multiple cross platform processes and provide a shared window / rendering area?
Any insights? | 0 |
42,146 | 09/03/2008 17:25:54 | 3,475 | 08/28/2008 17:53:18 | 16 | 0 | What are the best ways to determine what port an application is using? | This is an adapted version of a question from someone in my office. She's trying to determine how to tell what ports MSDE is running on for an application we have in the field.
Answers to that narrower question would be greatly appreciated. I'm also interested in a broader answer that could be applied to any networked applications. | sql-server | application | port | msde | null | null | open | What are the best ways to determine what port an application is using?
===
This is an adapted version of a question from someone in my office. She's trying to determine how to tell what ports MSDE is running on for an application we have in the field.
Answers to that narrower question would be greatly appreciated. I'm also interested in a broader answer that could be applied to any networked applications. | 0 |
42,150 | 09/03/2008 17:28:30 | 4,035 | 09/01/2008 13:56:45 | 1 | 1 | .NET: How to unit test Windows Service | .NET Framework: 2.0
Preferred Language: C#
Hi, folks.
I am new to TDD (Test Driven Development).
First of all, is it even possible to unit test Windows Service?
Windows service class is derived from ServiceBase, which has overridable methods,
1. OnStart
2. OnStop
How can I trigger those methods to be called as if unit test is an actual service that calls those methods in proper order?
At this point, am I even doing a Unit testing? or an Integration test?
I have looked at WCF service question but it didn't make any sense to me since I have never dealt with WCF service.
| c# | .net | service | unittest | windowsservice | null | open | .NET: How to unit test Windows Service
===
.NET Framework: 2.0
Preferred Language: C#
Hi, folks.
I am new to TDD (Test Driven Development).
First of all, is it even possible to unit test Windows Service?
Windows service class is derived from ServiceBase, which has overridable methods,
1. OnStart
2. OnStop
How can I trigger those methods to be called as if unit test is an actual service that calls those methods in proper order?
At this point, am I even doing a Unit testing? or an Integration test?
I have looked at WCF service question but it didn't make any sense to me since I have never dealt with WCF service.
| 0 |
42,153 | 09/03/2008 17:30:05 | 2,598 | 08/23/2008 13:13:34 | 336 | 26 | Java: JApplet, How do you embed it in a webpage? | I searched for this subject on Google and got some website about an expert sexchange...so I figured I should just ask here instead.
How do you embed a JApplet in html on a webpage? | java | html | web-applications | null | null | null | open | Java: JApplet, How do you embed it in a webpage?
===
I searched for this subject on Google and got some website about an expert sexchange...so I figured I should just ask here instead.
How do you embed a JApplet in html on a webpage? | 0 |
42,169 | 09/03/2008 17:36:25 | 1,765 | 08/18/2008 13:26:48 | 26 | 3 | If you were programming a calendar in HTML would you use Table tags or Div tags? | I converted my company's calendar to XSL and changed all the tables to divs. It worked pretty well, but I had a lot of 8 day week bugs to work out initially owing to precarious cross-browser spacing issues . but I was reading another post regarding when to use tables v. divs and the consensus seemed to be that you should only use divs for true divisions between parts of the webpage, and only use tables for tabular data.
I'm not sure I could even have used tables with XSL but I wanted to follow up that discussion of Divs and Tables with a discussion of the ideal way to make a web calendars and maybe a union of the two. | html | xslt | calendar | null | null | null | open | If you were programming a calendar in HTML would you use Table tags or Div tags?
===
I converted my company's calendar to XSL and changed all the tables to divs. It worked pretty well, but I had a lot of 8 day week bugs to work out initially owing to precarious cross-browser spacing issues . but I was reading another post regarding when to use tables v. divs and the consensus seemed to be that you should only use divs for true divisions between parts of the webpage, and only use tables for tabular data.
I'm not sure I could even have used tables with XSL but I wanted to follow up that discussion of Divs and Tables with a discussion of the ideal way to make a web calendars and maybe a union of the two. | 0 |
42,171 | 09/03/2008 17:37:20 | 1,950 | 08/19/2008 14:57:18 | 126 | 7 | SSIS copy directory from FTP location to a shared network location | I have the need to copy the entire contents of a directory on a FTP location onto a shared networked location. FTP Task has you specify the exact file name (not a directory) and File System Task does not allow accessing a FTP location. | ftp | ssis | business-intelligence | null | null | null | open | SSIS copy directory from FTP location to a shared network location
===
I have the need to copy the entire contents of a directory on a FTP location onto a shared networked location. FTP Task has you specify the exact file name (not a directory) and File System Task does not allow accessing a FTP location. | 0 |
42,182 | 09/03/2008 17:41:06 | 373 | 08/05/2008 09:37:52 | 391 | 34 | How to escape < and > inside <pre> tags | I'm trying to write a blog post which includes a code segment inside a <pre> tag. The code segment includes a generic type and uses <> to define that type. This is what the segment looks like:
<pre>
PrimeCalc calc = new PrimeCalc();
Func<int, int> del = calc.GetNextPrime;
</pre>
The resulting HTML removes the <> and ends up like this:
PrimeCalc calc = new PrimeCalc();
Func del = calc.GetNextPrime;
How do I escape the <> so they show up in the HTML?
| html | markup | escaping | blogger | null | null | open | How to escape < and > inside <pre> tags
===
I'm trying to write a blog post which includes a code segment inside a <pre> tag. The code segment includes a generic type and uses <> to define that type. This is what the segment looks like:
<pre>
PrimeCalc calc = new PrimeCalc();
Func<int, int> del = calc.GetNextPrime;
</pre>
The resulting HTML removes the <> and ends up like this:
PrimeCalc calc = new PrimeCalc();
Func del = calc.GetNextPrime;
How do I escape the <> so they show up in the HTML?
| 0 |
42,197 | 09/03/2008 17:46:21 | 30 | 08/01/2008 12:25:44 | 1,351 | 46 | How do I determine which process is using a serial port? | The company I work for makes hardware that communicates to the computer though a serial port. Third party companies write software that communicates with our hardware.
There are times when I need to diagnose our hardware. However, a third party software app connects to the serial port when Windows starts up, blocking any other connection. I don't know the name of this application/service and it's not always the same one.
Is there any way to either:
- Find the name/pid of the app/service that is currently using a given serial port or
- Steal the serial port connection from another app.
vb.net preferably, but I'll take a language agnostic answer as well. | vb.net | serial-port | null | null | null | null | open | How do I determine which process is using a serial port?
===
The company I work for makes hardware that communicates to the computer though a serial port. Third party companies write software that communicates with our hardware.
There are times when I need to diagnose our hardware. However, a third party software app connects to the serial port when Windows starts up, blocking any other connection. I don't know the name of this application/service and it's not always the same one.
Is there any way to either:
- Find the name/pid of the app/service that is currently using a given serial port or
- Steal the serial port connection from another app.
vb.net preferably, but I'll take a language agnostic answer as well. | 0 |
42,200 | 09/03/2008 17:46:50 | 4,299 | 09/02/2008 18:26:10 | 101 | 3 | Managing LINQ to SQL .dbml model complexity | This question is addressed to a degree in this question on [LINQ to SQL .dbml best practices](http://stackoverflow.com/questions/33664/best-practices-for-managing-linq-to-sql-dbml-files), but I am not sure how to add to a question.
One of our applications uses LINQ to SQL and we have currently have one .dbml file for the entire database which is becoming difficult to manage. We are looking at refactoring it a bit into separate files that are more module/functionality specific, but one problem is that many of the high level classes would have to be duplicated in several .dbml files as the associations can't be used across .dbml files (as far as I know), with the additional partial class code as well.
Has anyone grappled with this problem and what recommendations would you make? | linq | linq-to-sql | dbml | null | null | null | open | Managing LINQ to SQL .dbml model complexity
===
This question is addressed to a degree in this question on [LINQ to SQL .dbml best practices](http://stackoverflow.com/questions/33664/best-practices-for-managing-linq-to-sql-dbml-files), but I am not sure how to add to a question.
One of our applications uses LINQ to SQL and we have currently have one .dbml file for the entire database which is becoming difficult to manage. We are looking at refactoring it a bit into separate files that are more module/functionality specific, but one problem is that many of the high level classes would have to be duplicated in several .dbml files as the associations can't be used across .dbml files (as far as I know), with the additional partial class code as well.
Has anyone grappled with this problem and what recommendations would you make? | 0 |
42,203 | 09/03/2008 17:50:41 | 357 | 08/05/2008 01:29:23 | 1,104 | 64 | SQL Number Formating | I'm looking to use SQL to format a number with commas in the thousands, but no decimal (so can't use Money) - any suggestions?
I'm using SQL Server 2005, but feel free to answer for others as well (like MySQL) | sql | sql-server | mysql | null | null | null | open | SQL Number Formating
===
I'm looking to use SQL to format a number with commas in the thousands, but no decimal (so can't use Money) - any suggestions?
I'm using SQL Server 2005, but feel free to answer for others as well (like MySQL) | 0 |
42,210 | 09/03/2008 17:54:20 | 2,035 | 08/19/2008 21:33:29 | 1 | 0 | Does Google Chrome's process-per-tab model inherently use more memory than Firefox and IE? | Does the process-per-tab model that Chrome uses end up using more memory than Firefox and IE? Does it really matter? Sure, memory is cheap, but the cost of adding more memory is not insignificant. | chrome | null | null | null | null | 04/14/2011 13:33:54 | off topic | Does Google Chrome's process-per-tab model inherently use more memory than Firefox and IE?
===
Does the process-per-tab model that Chrome uses end up using more memory than Firefox and IE? Does it really matter? Sure, memory is cheap, but the cost of adding more memory is not insignificant. | 2 |
42,212 | 09/03/2008 17:54:51 | 3,205 | 08/27/2008 13:06:13 | 399 | 28 | How can I use Linq with a MySql database on Mono? | There are numerous libraries providing Linq capabilities to C# code interacting with a MySql database. Which one of them is the most stable and usable on Mono?
Background (mostly irrelevant): I have a simple C# (.Net 2.0) program updating values in a MySql database. It is executed nightly via a cron job and runs on a Pentium 3 450Mhz, Linux + Mono. I want to rewrite it using Linq (.Net 3.5) mostly as an exercise (I have not yet used Linq). | c# | linux | mysql | linq | mono | null | open | How can I use Linq with a MySql database on Mono?
===
There are numerous libraries providing Linq capabilities to C# code interacting with a MySql database. Which one of them is the most stable and usable on Mono?
Background (mostly irrelevant): I have a simple C# (.Net 2.0) program updating values in a MySql database. It is executed nightly via a cron job and runs on a Pentium 3 450Mhz, Linux + Mono. I want to rewrite it using Linq (.Net 3.5) mostly as an exercise (I have not yet used Linq). | 0 |
42,215 | 09/03/2008 17:57:05 | 1,659 | 08/17/2008 20:20:20 | 1,198 | 93 | [ASP.NET ERROR] The request was aborted: Could not create SSL/TLS secure channel. | I'm posting this on behalf of a co-worker.
He gets a "The request was aborted: Could not create SSL/TLS secure channel" error while using a WebRequest object to make an HTTPS request. Th funny thing is that this only happens after a while, and is temporarily fixed when the application is restarted, which suggests that something is being filled to capacity or something.
Has anyone seen this kind of thing before? | asp.net | https | web-application | null | null | null | open | [ASP.NET ERROR] The request was aborted: Could not create SSL/TLS secure channel.
===
I'm posting this on behalf of a co-worker.
He gets a "The request was aborted: Could not create SSL/TLS secure channel" error while using a WebRequest object to make an HTTPS request. Th funny thing is that this only happens after a while, and is temporarily fixed when the application is restarted, which suggests that something is being filled to capacity or something.
Has anyone seen this kind of thing before? | 0 |
42,234 | 09/03/2008 18:08:37 | 1,638 | 08/17/2008 17:58:57 | 386 | 46 | Simple effects in Flex | I would like to show some hidden text in a Flex application and have it fade out in a couple of seconds...
I have looked into Delay and Pause effects in Flex, but have yet to see an example of how to do this realistically easy effect...
anyone now how to do it or have a good resource?
Thanks.
| flex | null | null | null | null | null | open | Simple effects in Flex
===
I would like to show some hidden text in a Flex application and have it fade out in a couple of seconds...
I have looked into Delay and Pause effects in Flex, but have yet to see an example of how to do this realistically easy effect...
anyone now how to do it or have a good resource?
Thanks.
| 0 |
42,239 | 09/03/2008 18:11:09 | 1,753 | 08/18/2008 12:42:26 | 40 | 4 | Make a CD run once | We're doing an "Amazing Race" kind of event, and thought it would be cool to have CDs that could only play once... like a "this message will self destruct in 5 seconds..."
Any thoughts on how to do this? I was thinking it could be a compiled HTML website that would write a cookie and only play once. I don't want to write to the registry (don't want to depend on windows, don't want to install anything, etc).
I also don't care if it's hackable... This is a one-time fun event, and I don't really care too much if people could remove the cookie or something.
Any other ideas? | cd | embeddedwebserver | null | null | null | null | open | Make a CD run once
===
We're doing an "Amazing Race" kind of event, and thought it would be cool to have CDs that could only play once... like a "this message will self destruct in 5 seconds..."
Any thoughts on how to do this? I was thinking it could be a compiled HTML website that would write a cookie and only play once. I don't want to write to the registry (don't want to depend on windows, don't want to install anything, etc).
I also don't care if it's hackable... This is a one-time fun event, and I don't really care too much if people could remove the cookie or something.
Any other ideas? | 0 |
42,246 | 09/03/2008 18:16:07 | 3,442 | 08/28/2008 15:32:45 | 1 | 1 | Subversion Partial Export | I have somewhat interesting development situation. The client and deployment server are inside a firewall without access to the Subversion server. But the developers are outside the firewall and are able to use the Subversion server. The question is how to get just the updated files out of Subversion so that they can be physically transported through the firewall and put on the deployment server.
Right now the solution I have worked out is to update my local copy of the code and then pull out the most recently updated files using UnleashIT.
Are there any other suggestions? | subversion | deployment | null | null | null | null | open | Subversion Partial Export
===
I have somewhat interesting development situation. The client and deployment server are inside a firewall without access to the Subversion server. But the developers are outside the firewall and are able to use the Subversion server. The question is how to get just the updated files out of Subversion so that they can be physically transported through the firewall and put on the deployment server.
Right now the solution I have worked out is to update my local copy of the code and then pull out the most recently updated files using UnleashIT.
Are there any other suggestions? | 0 |
42,247 | 09/03/2008 18:16:17 | 122 | 08/02/2008 07:56:07 | 3,462 | 162 | Are semicolons needed after an object literal assignment in JavaScript? | The following code illustrates an object literal being assigned, but with no semicolon afterwards:
var literal = {
say: function(msg) { alert(msg); }
}
literal.say("hello world!");
This appears to be legal, and doesn't issue a warning (at least in FireFox 3). Is this completely legal, or is there a strict version of JavaScript where this is not allowed? I'm wondering in particular for future compatibility issues... I would like to be writing "correct" JavaScript, so if technically I need to use the semicolon, I would like to be using it. | javascript | null | null | null | null | null | open | Are semicolons needed after an object literal assignment in JavaScript?
===
The following code illustrates an object literal being assigned, but with no semicolon afterwards:
var literal = {
say: function(msg) { alert(msg); }
}
literal.say("hello world!");
This appears to be legal, and doesn't issue a warning (at least in FireFox 3). Is this completely legal, or is there a strict version of JavaScript where this is not allowed? I'm wondering in particular for future compatibility issues... I would like to be writing "correct" JavaScript, so if technically I need to use the semicolon, I would like to be using it. | 0 |
42,251 | 09/03/2008 18:19:10 | 3,759 | 08/30/2008 15:24:47 | 121 | 5 | Whither Managed Extensibility Framework for .NET? | Has anyone worked much with Microsoft's Managed Extensibility Framework (MEF)? Kinda sounds like it's trying to be all things to all people - It's an IoC container! It's an add-in manager! It's duck typing! I'm wondering if anyone has an experience with it, positive or negative.
We're currently planning on using an generic IoC implementation ala MvcContrib for our next big project. Should we throw MEF in the mix? | ioc | mef | null | null | null | null | open | Whither Managed Extensibility Framework for .NET?
===
Has anyone worked much with Microsoft's Managed Extensibility Framework (MEF)? Kinda sounds like it's trying to be all things to all people - It's an IoC container! It's an add-in manager! It's duck typing! I'm wondering if anyone has an experience with it, positive or negative.
We're currently planning on using an generic IoC implementation ala MvcContrib for our next big project. Should we throw MEF in the mix? | 0 |
42,254 | 09/03/2008 18:19:32 | 3,645 | 08/29/2008 16:48:00 | 1 | 0 | How do you pause before fading an element out using jQuery? | I would like to flash a success message on my page.
I am using the jQuery fadeOut method to fade and then remove the element. I can increase the duration to make it last longer, however this looks strange.
What I would like to happen is have the element be displayed for five seconds, then fade quickly, and finally be removed.
How can you animate this using jQuery? | jquery | javascript | animation | null | null | null | open | How do you pause before fading an element out using jQuery?
===
I would like to flash a success message on my page.
I am using the jQuery fadeOut method to fade and then remove the element. I can increase the duration to make it last longer, however this looks strange.
What I would like to happen is have the element be displayed for five seconds, then fade quickly, and finally be removed.
How can you animate this using jQuery? | 0 |
42,281 | 09/03/2008 18:41:03 | 1,965 | 08/19/2008 15:51:08 | 2,442 | 134 | IE6 and Caching | It seems that IE6 ignores any form of cache invalidation sent via http headers, I've tried setting Pragma to No Cache and setting Cache Expiration to the current time, yet in IE6, hitting back will always pull up a cached version of a page I am working on.
Is there a specific HTTP Header that IE6 does listen too? | caching | internet-explorer-6 | http-headers | null | null | null | open | IE6 and Caching
===
It seems that IE6 ignores any form of cache invalidation sent via http headers, I've tried setting Pragma to No Cache and setting Cache Expiration to the current time, yet in IE6, hitting back will always pull up a cached version of a page I am working on.
Is there a specific HTTP Header that IE6 does listen too? | 0 |
42,282 | 09/03/2008 18:41:11 | 17 | 08/01/2008 12:02:21 | 2,058 | 163 | Which way do you prefer to create your forms in MVC? | Which way do you prefer to create your forms in MVC?
<% Html.Form() { %>
<% } %>
Or
<form action="<%= Url.Action("ManageImage", "UserAccount") %>" method="post">
</form>
I understand that Html.Form() as of PR5 now just uses the URL provided by the request. However something about that doesn't sit well with me, especially since I will be getting all the baggage of any querystrings that are included.
What is your take? | asp.net | mvc | null | null | null | null | open | Which way do you prefer to create your forms in MVC?
===
Which way do you prefer to create your forms in MVC?
<% Html.Form() { %>
<% } %>
Or
<form action="<%= Url.Action("ManageImage", "UserAccount") %>" method="post">
</form>
I understand that Html.Form() as of PR5 now just uses the URL provided by the request. However something about that doesn't sit well with me, especially since I will be getting all the baggage of any querystrings that are included.
What is your take? | 0 |
42,286 | 09/03/2008 18:45:51 | 3,475 | 08/28/2008 17:53:18 | 38 | 1 | Using the .NET Framework, what's the best way to write the contents of a string to a text file? | It seems like there should be something shorter than this:
<pre>
private string LoadFromFile(string path)
{
try
{
string fileContents;
using(StreamReader rdr = File.OpenText(path))
{
fileContents = rdr.ReadToEnd();
}
return fileContents;
}
catch
{
throw;
}
}
</pre> | .net | string | textfile | null | null | null | open | Using the .NET Framework, what's the best way to write the contents of a string to a text file?
===
It seems like there should be something shorter than this:
<pre>
private string LoadFromFile(string path)
{
try
{
string fileContents;
using(StreamReader rdr = File.OpenText(path))
{
fileContents = rdr.ReadToEnd();
}
return fileContents;
}
catch
{
throw;
}
}
</pre> | 0 |
42,294 | 09/03/2008 18:51:17 | 1,288 | 08/14/2008 12:14:17 | 451 | 37 | How do you get the footer to stay at the bottom of a Web page? | I have a simple 2-column layout with a footer that clears both the right and left div in my markup. My problem is that I can't get the footer to stay at the bottom of the page in all browsers. It works if the content pushes the footer down, but that's not always the case. [Here's a link][1] to the page so you can see what I'm working with.
[1]: http://www.thriftcart.com/ | html | css | null | null | null | null | open | How do you get the footer to stay at the bottom of a Web page?
===
I have a simple 2-column layout with a footer that clears both the right and left div in my markup. My problem is that I can't get the footer to stay at the bottom of the page in all browsers. It works if the content pushes the footer down, but that's not always the case. [Here's a link][1] to the page so you can see what I'm working with.
[1]: http://www.thriftcart.com/ | 0 |
42,308 | 09/03/2008 18:58:35 | 45,603 | 08/25/2008 09:52:34 | 86 | 9 | Tool to track #include dependencies | Any good suggestions? Input will be the name of a header file and output should be a list (preferably a tree) of all files including it directly or indirectly. | c++ | c | software-tools | header | null | null | open | Tool to track #include dependencies
===
Any good suggestions? Input will be the name of a header file and output should be a list (preferably a tree) of all files including it directly or indirectly. | 0 |
42,312 | 09/03/2008 19:00:01 | 2,213 | 08/20/2008 22:31:55 | 495 | 30 | Are There Adapters for CF Type II to MicroSD? | I honestly have only started recently researching this so my knowledge is limited. I was approached about adapting some Pocket PC software to operate on the Windows 6 platform. After considering how I would go about doing that in the Compact Framework I received more details.
It seems there is a desire to utilize (re-use) CF Type II devices on a mobile phone platform (using more modern miniSD or microSD slots). While there exist plenty of microSD to CF adapters, there seems to be none going the other direction (even though I realize that would be an awkward looking adapter in physical design). **Is this true and what prevents this technically?**
| hardware | mobile | pocketpc | null | null | null | open | Are There Adapters for CF Type II to MicroSD?
===
I honestly have only started recently researching this so my knowledge is limited. I was approached about adapting some Pocket PC software to operate on the Windows 6 platform. After considering how I would go about doing that in the Compact Framework I received more details.
It seems there is a desire to utilize (re-use) CF Type II devices on a mobile phone platform (using more modern miniSD or microSD slots). While there exist plenty of microSD to CF adapters, there seems to be none going the other direction (even though I realize that would be an awkward looking adapter in physical design). **Is this true and what prevents this technically?**
| 0 |
42,323 | 09/03/2008 19:07:03 | 2,138 | 08/20/2008 14:23:45 | 88 | 7 | Real image width with Javascript | I have the next function:
function setImagesWidth(id,width) {
var images = document.getElementById(id).getElementsByTagName("img");
for(var i = 0; i < images.length;i++) {
// If the real width is bigger than width parameter
images[i].style.width=width;
//}
}
}
I would like to set the css width attribute of all my img tags to a particular value only when the image real width is bigger than the attribute value. If it is possible, i would like a solution which does not use any particular framework.
Thanks in advanced! | javascript | null | null | null | null | null | open | Real image width with Javascript
===
I have the next function:
function setImagesWidth(id,width) {
var images = document.getElementById(id).getElementsByTagName("img");
for(var i = 0; i < images.length;i++) {
// If the real width is bigger than width parameter
images[i].style.width=width;
//}
}
}
I would like to set the css width attribute of all my img tags to a particular value only when the image real width is bigger than the attribute value. If it is possible, i would like a solution which does not use any particular framework.
Thanks in advanced! | 0 |
42,330 | 09/03/2008 19:12:26 | 2,535 | 08/22/2008 17:36:15 | 64 | 4 | Suggestion for some .NET training | Is there any training that you would recommend for someone looking at doing more with .NET? Does IBM have any good trainings? More specifically, C# and web application development. While I have written a couple applications, I want something that can give me a better solid base on developing in .NET. I'll be supporting our web developer more in the future and we are just kind of browsing around so I can have a more firm understanding. Not necessarily a 101 class, but maybe 102 or 103. | c# | .net | visual-studio | training | null | null | open | Suggestion for some .NET training
===
Is there any training that you would recommend for someone looking at doing more with .NET? Does IBM have any good trainings? More specifically, C# and web application development. While I have written a couple applications, I want something that can give me a better solid base on developing in .NET. I'll be supporting our web developer more in the future and we are just kind of browsing around so I can have a more firm understanding. Not necessarily a 101 class, but maybe 102 or 103. | 0 |
42,333 | 09/03/2008 19:15:55 | 1,409 | 08/15/2008 13:18:51 | 504 | 35 | How to display a live streaming video using VideoDisplay in Flex | I'm wondering how to use a VideoDisplay object (defined in MXML) to display video streamed from FMS via a NetStream.
The [Flex3 docs][1] suggest this is possible:
> The Video Display ... supports progressive download over HTTP, streaming from the Flash Media Server, and streaming from a Camera object.
However, later in the docs all I can see is an attachCamera() method. There doesn't appear to be an attachStream() method like the old Video object has.
It looks like you can play a fixed file served over HTML by using the source property, but I don't see anything about how to attach a NetStream.
The old [Video][2] object still seems to exist, though it's not based on UIComponent and doesn't appear to be usable in MXML.
[1]: http://livedocs.adobe.com/flex/3/langref/mx/controls/VideoDisplay.html
[2]: http://livedocs.adobe.com/flex/3/langref/flash/media/Video.html | flex | video | streaming | null | null | null | open | How to display a live streaming video using VideoDisplay in Flex
===
I'm wondering how to use a VideoDisplay object (defined in MXML) to display video streamed from FMS via a NetStream.
The [Flex3 docs][1] suggest this is possible:
> The Video Display ... supports progressive download over HTTP, streaming from the Flash Media Server, and streaming from a Camera object.
However, later in the docs all I can see is an attachCamera() method. There doesn't appear to be an attachStream() method like the old Video object has.
It looks like you can play a fixed file served over HTML by using the source property, but I don't see anything about how to attach a NetStream.
The old [Video][2] object still seems to exist, though it's not based on UIComponent and doesn't appear to be usable in MXML.
[1]: http://livedocs.adobe.com/flex/3/langref/mx/controls/VideoDisplay.html
[2]: http://livedocs.adobe.com/flex/3/langref/flash/media/Video.html | 0 |
42,342 | 09/03/2008 19:20:27 | 1,965 | 08/19/2008 15:51:08 | 2,442 | 135 | IE6 rending UL's incorrectly | Sometimes IE6 will render the text of a UL list the same color as the background color, if you select it, they show back up, or if you scroll the page up and back down.
Its obviously a rendering bug, but I was wondering if anyone knows of a workaround to make it reliable?
| internet-explorer-6 | css | ul | rendering | null | null | open | IE6 rending UL's incorrectly
===
Sometimes IE6 will render the text of a UL list the same color as the background color, if you select it, they show back up, or if you scroll the page up and back down.
Its obviously a rendering bug, but I was wondering if anyone knows of a workaround to make it reliable?
| 0 |
42,354 | 09/03/2008 19:27:24 | 1,940 | 08/19/2008 14:38:08 | 117 | 12 | Does anyone still use ObjectPal? | ObjectPal is the programming language used by the Borland Paradox database application (now owned by Corel). I'm interested in just looking at it again for nostalgic value and nothing else. Anyone know if there is an emulator or something for it? | paradox | null | null | null | null | null | open | Does anyone still use ObjectPal?
===
ObjectPal is the programming language used by the Borland Paradox database application (now owned by Corel). I'm interested in just looking at it again for nostalgic value and nothing else. Anyone know if there is an emulator or something for it? | 0 |
42,357 | 09/03/2008 19:28:30 | 1,463 | 08/15/2008 17:26:44 | 311 | 26 | How do you check your URL for SQL Injection Attacks? | I've seen a few attempted SQL injection attacks on one of my web sites. It comes in the form of a query string that includes the "cast" keyword and a bunch of hex characters which when "decoded" are an injection of banner adverts into the DB.
My solution is to scan the full URL (and params) and search for the presence of "cast(0x" and if it's there to redirect to a static page.
How do you check your URL's for SQL Injection attacks? | sql | sql-server | null | null | null | null | open | How do you check your URL for SQL Injection Attacks?
===
I've seen a few attempted SQL injection attacks on one of my web sites. It comes in the form of a query string that includes the "cast" keyword and a bunch of hex characters which when "decoded" are an injection of banner adverts into the DB.
My solution is to scan the full URL (and params) and search for the presence of "cast(0x" and if it's there to redirect to a static page.
How do you check your URL's for SQL Injection attacks? | 0 |
42,366 | 09/03/2008 19:32:00 | 4,437 | 09/03/2008 19:31:59 | 1 | 0 | What does the EXE do in the Visual Studio setup project output | We are working on a winforms app in Visual Studio 2005 and the setup project we created output both an MSI and an EXE. We aren't sure what the EXE file is used for because we are able to install without the EXE. | visual-studio | installer | setup | msi | exe | null | open | What does the EXE do in the Visual Studio setup project output
===
We are working on a winforms app in Visual Studio 2005 and the setup project we created output both an MSI and an EXE. We aren't sure what the EXE file is used for because we are able to install without the EXE. | 0 |
42,383 | 09/03/2008 19:37:58 | 3,044 | 08/26/2008 13:31:46 | 441 | 32 | Java object allocation overhead | I am writing an immutable DOM tree in Java, to simplify access from multiple threads.*
However, it does need to support inserts and updates as fast as possible. And since it is immutable, if I make a change to a node on the N'th level of the tree, I need to allocate at least N new nodes in order to return the new tree.
My question is, would it be dramatically faster to pre-allocate nodes rather than create new ones every time the tree is modified? It would be fairly easy to do - keep a pool of several hundred unused nodes, and pull one out of the pool rather than create one whenever it was required for a modify operation. I can replenish the node pool when there's nothing else going on. (in case it isn't obvious, execution time is going to be much more at a premium in this application than heap space is)
Is it worthwhile to do this? Any other tips on speeding it up?
Alternatively, does anyone know if an immutable DOM library already? I searched, but couldn't find anything.
*Note: For those of you who aren't familiar with the concept of immutability, it basically means that on any operation to an object that changes it, the method returns a copy of the object with the changes in place, rather than the changed object. Thus, if another thread is still reading the object it will continue to happily operate on the "old" version, unaware that changes have been made, rather than crashing horribly. See [http://www.javapractices.com/topic/TopicAction.do?Id=29][1]
[1]: http://www.javapractices.com/topic/TopicAction.do?Id=29 | java | xml | concurrency | null | null | null | open | Java object allocation overhead
===
I am writing an immutable DOM tree in Java, to simplify access from multiple threads.*
However, it does need to support inserts and updates as fast as possible. And since it is immutable, if I make a change to a node on the N'th level of the tree, I need to allocate at least N new nodes in order to return the new tree.
My question is, would it be dramatically faster to pre-allocate nodes rather than create new ones every time the tree is modified? It would be fairly easy to do - keep a pool of several hundred unused nodes, and pull one out of the pool rather than create one whenever it was required for a modify operation. I can replenish the node pool when there's nothing else going on. (in case it isn't obvious, execution time is going to be much more at a premium in this application than heap space is)
Is it worthwhile to do this? Any other tips on speeding it up?
Alternatively, does anyone know if an immutable DOM library already? I searched, but couldn't find anything.
*Note: For those of you who aren't familiar with the concept of immutability, it basically means that on any operation to an object that changes it, the method returns a copy of the object with the changes in place, rather than the changed object. Thus, if another thread is still reading the object it will continue to happily operate on the "old" version, unaware that changes have been made, rather than crashing horribly. See [http://www.javapractices.com/topic/TopicAction.do?Id=29][1]
[1]: http://www.javapractices.com/topic/TopicAction.do?Id=29 | 0 |
42,386 | 09/03/2008 19:40:25 | 4,438 | 09/03/2008 19:40:25 | 1 | 0 | What is the C# equivalent of the Oracle PL/SQL COALESCE function? | Is there a one statement or one line way to accomplish something like this, where the string s is declared AND assigned the first non-null value in the expression?
//pseudo-codeish
string s = Coalesce(string1, string2, string3);
or, more generally,
object obj = Coalesce(obj1, obj2, obj3, ...objx);
| c# | oracle | null | null | null | null | open | What is the C# equivalent of the Oracle PL/SQL COALESCE function?
===
Is there a one statement or one line way to accomplish something like this, where the string s is declared AND assigned the first non-null value in the expression?
//pseudo-codeish
string s = Coalesce(string1, string2, string3);
or, more generally,
object obj = Coalesce(obj1, obj2, obj3, ...objx);
| 0 |
42,394 | 09/03/2008 19:42:44 | 1,476 | 08/15/2008 19:09:14 | 266 | 7 | Internet startups outside the US | Most Internet companies are based in the US. Some start to appear in (eastern) Europe, Australia and Israel. What are the advantages and challenges of such 'foreign' companies, baring in mind that most of the Internet's activity, hype and bandwidth are still US centric? | internet | startups | null | null | null | 11/25/2011 03:21:29 | off topic | Internet startups outside the US
===
Most Internet companies are based in the US. Some start to appear in (eastern) Europe, Australia and Israel. What are the advantages and challenges of such 'foreign' companies, baring in mind that most of the Internet's activity, hype and bandwidth are still US centric? | 2 |
42,395 | 09/03/2008 19:42:50 | 1,048 | 08/11/2008 19:34:31 | 87 | 13 | How do I write a While loop | How do you write the syntax for a While loop?
## C`#`
> int i=0;
While (i! = 10)
{
Console.WriteLine(i);
i++;
}
## VB.Net
> Dim i As Integer = 0
While i <> 10
Console.WriteLine(i)
i += 1
End While
| conditional | c# | vb.net | null | null | null | open | How do I write a While loop
===
How do you write the syntax for a While loop?
## C`#`
> int i=0;
While (i! = 10)
{
Console.WriteLine(i);
i++;
}
## VB.Net
> Dim i As Integer = 0
While i <> 10
Console.WriteLine(i)
i += 1
End While
| 0 |
42,396 | 09/03/2008 19:43:22 | 1,414 | 08/15/2008 15:07:31 | 844 | 66 | ASP.Net: why is my button's click/command events not binding in a repeater? | Here's the code from the ascx that has the repeater:
<asp:Repeater ID="ListOfEmails" runat="server" >
<HeaderTemplate><h3>A sub-header:</h3></HeaderTemplate>
<ItemTemplate>
[Some other stuff is here]
<asp:Button ID="removeEmail" runat="server" Text="X" ToolTip="remove" />
</ItemTemplate>
</asp:Repeater>
And in the codebehind for the repeater's databound and events:
Protected Sub ListOfEmails_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles ListOfEmails.ItemDataBound
If (e.Item.ItemType = ListItemType.Item) Or (e.Item.ItemType = ListItemType.AlternatingItem) Then
Dim removeEmail As Button = CType(e.Item.FindControl("removeEmail"), Button)
removeEmail.CommandArgument = e.Item.ItemIndex.ToString()
AddHandler removeEmail.Click, AddressOf removeEmail_Click
AddHandler removeEmail.Command, AddressOf removeEmail_Command
End If
End Sub
Sub removeEmail_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Response.Write("<h1>click</h1>")
End Sub
Sub removeEmail_Command(ByVal sender As Object, ByVal e As CommandEventArgs)
Response.Write("<h1>command</h1>")
End Sub
Neither the click or command is getting called, what am I doing wrong? | asp.net | vb.net | .net-2.0 | repeater | button | null | open | ASP.Net: why is my button's click/command events not binding in a repeater?
===
Here's the code from the ascx that has the repeater:
<asp:Repeater ID="ListOfEmails" runat="server" >
<HeaderTemplate><h3>A sub-header:</h3></HeaderTemplate>
<ItemTemplate>
[Some other stuff is here]
<asp:Button ID="removeEmail" runat="server" Text="X" ToolTip="remove" />
</ItemTemplate>
</asp:Repeater>
And in the codebehind for the repeater's databound and events:
Protected Sub ListOfEmails_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles ListOfEmails.ItemDataBound
If (e.Item.ItemType = ListItemType.Item) Or (e.Item.ItemType = ListItemType.AlternatingItem) Then
Dim removeEmail As Button = CType(e.Item.FindControl("removeEmail"), Button)
removeEmail.CommandArgument = e.Item.ItemIndex.ToString()
AddHandler removeEmail.Click, AddressOf removeEmail_Click
AddHandler removeEmail.Command, AddressOf removeEmail_Command
End If
End Sub
Sub removeEmail_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Response.Write("<h1>click</h1>")
End Sub
Sub removeEmail_Command(ByVal sender As Object, ByVal e As CommandEventArgs)
Response.Write("<h1>command</h1>")
End Sub
Neither the click or command is getting called, what am I doing wrong? | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.