instruction
stringlengths
0
30k
You can have multiple endpoints defined either on the server, or the client. To do it on the client, you just need to edit your app.config file with a new endpoint with a different name, then define when you create your new client. For example if you have an endpoint in your client app like: <endpoint addr...
You should be able to export the documents to word or excel and then use OpenOffice to open the documents. No additional set up required.
If you just commit your working copy, you'll get a file list showing you your unversioned files, which you can tick to add as you commit. You don't have to add them explicitly before you commit.
Wait until file is unlocked in .Net
|.net|.net-3.5|file|
What's the simplest way of blocking a thread until a file has been unlocked and is accessible for reading and renaming? EG: Is there a WaitOnFile() somewhere in the framework? I have a service that uses a FileSystemWatcher to look for files that are to be transmitted to an FTP site, but the File Created event fires ...
Another totally different way of looking at it would be to pass a lambda expression (condition for populating the second collection) as a predicate to the first collection. I know this is not the exact answer to the question. I think other users already gave the correct answer.
Only a good amount of accumulated statistics from previous projects can help you to give precise estimates. If you have a well defined set of requirements, you can make a rough calculation of how many test cases you have. As I said you need to have some statistics for your team. You need to know average bugs-per-loc nu...
Only a good amount of accumulated statistics from previous projects can help you to give precise estimates. If you have a well defined set of requirements, you can make a rough calculation of how many use cases you have. As I said you need to have some statistics for your team. You need to know average bugs-per-loc num...
Lists allow duplicate items, while Sets allow only one instance. I'll use a Map whenever I'll need to perform a lookup. For the specific implementations, there are order-preserving variations of Maps and Sets but largely it comes down to speed. I'll tend to use ArrayList for reasonably small Lists and HashSet for...
Lists allow duplicate items, while Sets allow only one instance. I'll use a Map whenever I'll need to perform a lookup. For the specific implementations, there are order-preserving variations of Maps and Sets but largely it comes down to speed. I'll tend to use ArrayList for reasonably small Lists and HashSet for...
Best way to manage generated code in an automated build?
|build-process|automation|nant|code-generation|
In my automated NAnt build we have a step that generates a lot of code off of the database (using SubSonic) and the code is separated into folders that match the schema name in the database. For example: - /generated-code - /dbo - SomeTable.cs - OtherTable.cs - /abc - Customer.cs ...
Having worked on a lot of waterfall projects in the past and a lot of adhoc and agile projects more recently, there's a number of design artifacts I like to create although I can't state enough that it really depends on the details of the project (methodology/team structure/timescale/tools etc). For a generic server...
I'm not too sure what is going on here, but sometimes a particular file in my repository will change the case of it's name. e.g.,: before: File.h after: file.h I don't really care why this is happening, but this causes git to think it is a new file, and then I have to go and change the file name back. Can yo...
|windows|git|
I'm not too sure what is going on here, but sometimes a particular file in my repository will change the case of it's name. e.g.,: before: File.h after: file.h I don't really care why this is happening, but this causes git to think it is a new file, and then I have to go and change the file name back. Can yo...
A different approach, just for kicks: Console.WriteLine(string.Join("\t", list.Cast<string>().ToArray()));
You probably need the [http.proxyHost and http.proxyPort system properties][1] set. For example, `ANT_OPTS="-Dhttp.proxyHost=proxy.y.com" ant doc` Alternatively, you could set the "offline" flag and provide a package list, but that could be a pain for the Java core. [1]: http://java.sun.com/j2se/1.4.2/docs/gu...
select foo from Bar order by newid()
I really think you just need to agree on a clear definition of what you mean when you say "business logic". If you need to be "politically sensitive", you could even craft the definition around your team lead's understanding, then come up with another term ("domain rules"?) that defines what you want to talk about. ...
I suspect that the real issue here is that your test runner is copying your assembly to a different location. There's no way at runtime to tell where the assembly was copied from, but you can probably flip a switch to tell the test runner to run the assembly from where it is and not to copy it to a shadow directory. ...
Do you really want to do run the regexp twice? Without having checked (bad me) I would have thought that this would work well: public static string StripStringFormating(string formattedString) { return rTest.Replace(formattedString, string.Empty); } If it does, you should see it run ~twice as fast...
Cannot delete from the database...?
|database|db2|
So, I have 2 database instances, one is for development in general, another was copied from development for unit tests. Something changed in the development database that I can't figure out, and I don't know how to see what is different. When I try to delete from a particular table, with for example: delet...
Searching subversion history (full text)
|full-text-search|subversion|
Is there a way to perform a full text search of a subversion repository, including all the history? For example, I've written a feature that I used somewhere, but then it wasn't needed, so I svn rm'd the files, but now I need to find it again to use it for something else. The svn log probably says something like "re...
Is there a way to perform a full text search of a subversion repository, including all the history? For example, I've written a feature that I used somewhere, but then it wasn't needed, so I svn rm'd the files, but now I need to find it again to use it for something else. The svn log probably says something like "re...
Is there a way to perform a full text search of a subversion repository, including all the history? For example, I've written a feature that I used somewhere, but then it wasn't needed, so I svn rm'd the files, but now I need to find it again to use it for something else. The svn log probably says something like "re...
|svn|full-text-search|
Is there a way to perform a full text search of a subversion repository, including all the history? For example, I've written a feature that I used somewhere, but then it wasn't needed, so I svn rm'd the files, but now I need to find it again to use it for something else. The svn log probably says something like "re...
Maybe I just write buggy code, but I like having a 1:1 ratio between devs and tests. I don't wait until alpha to test, but rather do it throughout the whole project. The logic? Depending on your release schedule, there could be a good deal of time between when development starts and when your alpha, beta, and ship date...
Maybe I just write buggy code, but I like having a 1:1 ratio between devs and tests. I don't wait until alpha to test, but rather do it throughout the whole project. The logic? Depending on your release schedule, there could be a good deal of time between when development starts and when your alpha, beta, and ship date...
Having worked on a lot of waterfall projects in the past and a lot of adhoc and agile projects more recently, there's a number of design artifacts I like to create although I can't state enough that it really depends on the details of the project (methodology/team structure/timescale/tools etc). For a generic server...
Having worked on a lot of waterfall projects in the past and a lot of adhoc and agile projects more recently, there's a number of design artifacts I like to create although I can't state enough that it really depends on the details of the project (methodology/team structure/timescale/tools etc). For a generic, serve...
Use a ORM package, any half decent package will allow you to 1. Get simple result sets 2. Keep your complex SQL close to the data model If you have very complex SQL, then views are also nice to making it more presentable to different layers of your application.
[Guidelines for Handheld & Mobile Device User Interface][1]: > While there has been much successful work in developing rules to guide the design and implementation of interfaces for desktop machines and their applications, the design of mobile device interfaces is still relatively unexplored and unproven. This paper d...
We were in a similar predicament at one time. We queried a specific table in a variety of ways, over 50+. What we ended up doing was creating a single Fetch stored procedure that includes a parameter value for the WhereClause. The WhereClause was constructed in a Provider object, we employed the Facade design pa...
When you run a schedule task you can have it run under a user. Verify the user that is running the schedule task has the same rights for the fax resource as you. Which is why you can run it when you double click in Windows explore.
Examples of using semantic web technologies in real world applications
|semantic-web|rdf|
Are you working on a (probably commercial) product which uses RDF/OWL/SPARQL technologies? If so, can you please describe your product?
How do I generate a Friendly URL in C#?
|c#|friendly-url|
How can I go about generating a Friendly URL in C#? Currently I simple replace spaces with an underscore, but how would I go about generating URL's like Stack Overflow? For example how can I convert: > How do I generate a Friendly URL in C#? Into > how-do-i-generate-a-friendly-url-in-C
@Mark: Minor detail: `sizeof` gives you the size in chars, not bytes, so if you happen to be on a platform where a char is not the same size as a byte, you are subtly wrong :)
@Mark: Minor detail: `sizeof` gives you the size in chars, not bytes, so if you happen to be on a platform where a char is not the same size as a byte, you are subtly wrong :) Also, it is worth noting that `sizeof` doesn't help if you are dealing with a pointer to an array: int a[10]; int* p = a; ...
So far, based on the lack of responses to <a href="http://stackoverflow.com/questions/31059/how-do-you-configure-an-openfiledialog-to-select-folders">my identical question</a>, I'd assume the answer is to roll your own dialog from scratch. I've seen things here and there about subclassing the common dialogs from VB6...
Have you set a `:visited` setting in your stylesheet?
Run your CSS file and your HTML file through the w3c validators. I had a similar problem when testing an application in Safari. The problem was in my code.
An addition to Chris's post: You may also have to upgrade the repository itself, if you run into "Retrieval of mergeinfo unsupported" messages. The command to run on the server to do this is, svnadmin upgrade REPOS_PATH where REPOS_PATH is the local path to your repository of course.
**InternalsVisibleTo** attribute is one that is not that well known, but can come in increadibly handy in certain circumstances. It basically allows another assembly to be able to access "internal" elements of the defining assembly.
[**@Orion**][1] has this *partially* correct - there is *one other way* to deal with these, and that is to cover the offending select lists with an iframe. This technique is used in [**Cody Lindley's ThickBox**][2] (written for jQuery). See the code for details on how to do it. [1]: http://stackoverflow.com/ques...
Getting an int representation of a String
|java|performance|string|
I am looking for a way to create an int\long representation of an arbitrary alpha-numeric String. Hash codes won't do it, because I can't afford hash collisions i.e. the representation must be unique and repeatable. The numeric representation will be used to perform efficient (hopefully) compares. The creation of t...
The easiest way is to make `www.mydomain.com/test` serve a HTML file which has a single frame with the plain IP address. However, this means that the URL in the (awesome) address bar always stays exactly the same, even if you click a link on the displayed page. (You can avoid this by adding `target=_top` in the `href`,...
|functionalprogramming|lisp|scheme|
|functional-programming|lisp|scheme|
I'm kinda guessing here, but could it be because: * You are trying to perform file operations in C: root? (there may be protection on this by Vista if you are using it - not sure?) * You are trying to copy to a non-existant directory? * The file already exists and may be locked? (i.e you have not closed another ap...
About File permissions in C#
|c#|
While creating a file synchronization program in C# I tryed to make a method 'copy' from LocalFileItem class that uses sing System.IO.File.Copy(destination.Path, Path, true) where Path is a string. After executing this code with destination.Path = "C:\\Test2" and this.Path = "C:\\Test\\F1.txt" I get an exception sayin...
While creating a file synchronization program in C# I tryed to make a method 'copy' from LocalFileItem class that uses sing System.IO.File.Copy(destination.Path, Path, true) where Path is a string. After executing this code with destination.Path = "C:\\Test2" and this.Path = "C:\\Test\\F1.txt" I get an exception sayin...
|c#|files|copy|
How do I create a Class using the Singleton Design Pattern in Ruby?
|designpatterns|ruby|
The singleton pattern is a design pattern that is used to restrict instantiation of a class to one object instance. Although I know how to code the singleton pattern in C++ and Java, I was wondering if anyone know how to implement it in Ruby?
|ruby|designpatterns|singleton|
|ruby|design-patterns|singleton|
File Parse Design Pattern
|designpatterns|fileparse|
Does anybody recommend a design pattern for taking a binary data file, parsing parts of it into objects and storing the resultant data into a database? I think a similar pattern could be used for taking an XML or tab-delimited file and parse it into their representative objects. A common data structure would in...
|design-patterns|fileparse|
Transactional Design Pattern
|sharepoint|transaction|designpatterns|
I have a need to create a "transactional" process using an external API that does not support COM+ or .NET transactions (Sharepoint to be exact) What I need to do is to be able to perform a number of processes in a sequence, but any failure in that sequence means that I will have to manually undo all of the previous...
Maybe I just write buggy code, but I like having a 1:1 ratio between devs and tests. I don't wait until alpha to test, but rather do it throughout the whole project. The logic? Depending on your release schedule, there could be a good deal of time between when development starts and when your alpha, beta, and ship date...
I agree that it is typically better to start out with a normalized DB and then denormalize to solve very specific problems, but I'd probably start at [Boyce-Codd Normal Form](http://en.wikipedia.org/wiki/Boyce-Codd_Normal_Form) instead of 3rd Normal Form.
I'd look at the routing table. Whichever NIC has an 0.0.0.0 route AND is enabled AND has the lowest metric, is the nic that's currently sending packets to the internet. So in my case, the top one is the 'internet nic'. IPv4 Route Table =====================================================================...
I asked a similar question, and ended up writing an [answer][1] which used WMI to enum the group members. I had real problems with authentication in the system.directoryservices.accountmanagement stuff. YMMV, of course. [1]: http://stackoverflow.com/questions/21514/enumerate-windows-user-group-members-on-remote-...
the function you need is: <code>CeRunAppAtTime( appname, time )</code> that isn't the exact signature, there is also <code>CeRunAppAtEvent</code>, they should both be in the MSDN docs (but linking is useless the way MSDN urls always change) The normal way to use these (and <code>RunAppAtTime</code> in the mana...
I am not entirely up to date on the latest best practices, et cetera when it comes to code layout, but when I did my first GAE application, I used something along your second option, where the code and templates are next to eachother. There was two reasons for this - one, it kept the code and template nearby, and se...
Is it possible to forward ssh requests that come in over a certain port to another machine?
|macos|ubuntu|ssh|port|
I have a small local network. Only one of the machines is available to the outside world (this is not easily changeable). I'd like to be able to set it up such that ssh requests that don't come in on the standard port go to another machine. Is this possible? If so, how? Oh and all of these machines are running eithe...
You can use Port Fowarding to do this. Take a look here: <http://portforward.com/help/portforwarding.htm> There are instructions on how to set up your router to port forward request on this page: <http://www.portforward.com/english/routers/port_forwarding/routerindex.htm>
I primarily use NHibernate, both at work and on my freetime projects. This started as an attempt to break out of the norm at work to use ADO.NET datareaders/datasets and we now have a few projects using Hibernate/NHibernate.
I have one word "debugging" - you never want to have to use it but you always do. In .Net if you're using Visual Studio you have a fantastic debugger when compared to trying to debug code on ASP.
Well, there are a few minor improvements we could make. ;) I would use a Timer to make sure callers don't have to wait for the method to return. And preventing more than one flashing operation at a time on a given window would be nice to. import java.util.Map; import java.util.Timer; import java.uti...
Well, there are a few minor improvements we could make. ;) I would use a Timer to make sure callers don't have to wait for the method to return. And preventing more than one flashing operation at a time on a given window would be nice too. import java.util.Map; import java.util.Timer; import java.ut...
@Mark: Minor detail: `sizeof` gives you the size in chars, not bytes, so if you happen to be on a platform where a char is not the same size as a byte, you are subtly wrong :) Also, it is worth noting that `sizeof` doesn't help if you are dealing with a pointer to an array: int a[10]; int* p = a; ...
@Mark: Minor detail: `sizeof` gives you the size in chars, not bytes, so if you happen to be on a platform where a char is not the same size as a byte, you are subtly wrong :) Also, it is worth noting that `sizeof` doesn't help if you are dealing with a pointer to an array: int a[10]; int* p = a; ...
It is worth noting that `sizeof` doesn't help if you are dealing with a pointer to an array: int a[10]; int* p = a; assert(sizeof(a) / sizeof(a[0]) == 10); assert(sizeof(p) == sizeof(void*)); --- @Skizz: The standard wins over Wikipedia any day of the week :) @DrPizza: Wikipedia does no...
Untested, but it'll be something like this: var matches = from o in objList join i in intList on o.ID equals i.ID select o;
Untested, but it'll be something like this: var matches = from o in objList join i in intList on o.ID equals i select o; @Konrad just tested it, and it does work - I just had a typo where I'd written "i.ID" rather than "i".
MSMQ monitoring