question_id int64 4 6.31M | answer_id int64 7 6.31M | title stringlengths 9 150 | question_body stringlengths 0 28.8k | answer_body stringlengths 60 27.2k | question_text stringlengths 40 28.9k | combined_text stringlengths 124 39.6k | tags listlengths 1 6 | question_score int64 0 26.3k | answer_score int64 0 28.8k | view_count int64 15 14M | answer_count int64 0 182 | favorite_count int64 0 32 | question_creation_date stringdate 2008-07-31 21:42:52 2011-06-10 18:12:18 | answer_creation_date stringdate 2008-07-31 22:17:57 2011-06-10 18:14:17 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
193,873 | 193,879 | What sorts of things should I do to make a performant and robust reflection cache? | In.NET 3.5, I'm going to be working with System.Reflection to use AOP (probably in the context of Castle's Windsor Interceptors) to do things like define which security actions need to be performed at the method level, etc. I have heard that some parts of Reflection are slow (I've read the MSDN article around it), and ... | Explicitly calling a MethodInfo is indeed slow - but you can make it much, much faster if you convert it into a delegate. See this blog post for example. That doesn't help in terms of finding methods etc of course, but if you're going to call the method repeatedly it's worth bearing in mind. The cache key sounds easy e... | What sorts of things should I do to make a performant and robust reflection cache? In.NET 3.5, I'm going to be working with System.Reflection to use AOP (probably in the context of Castle's Windsor Interceptors) to do things like define which security actions need to be performed at the method level, etc. I have heard ... | TITLE:
What sorts of things should I do to make a performant and robust reflection cache?
QUESTION:
In.NET 3.5, I'm going to be working with System.Reflection to use AOP (probably in the context of Castle's Windsor Interceptors) to do things like define which security actions need to be performed at the method level, ... | [
"c#",
".net",
"reflection",
"caching"
] | 2 | 3 | 222 | 2 | 0 | 2008-10-11T08:56:39.430000 | 2008-10-11T09:07:31.513000 |
193,875 | 193,948 | Assembly not saving correctly | I have some very simple code to generate an assembly and invoke a method on a contained type. The method gets called and runs correctly, however when I view the generated assembly using Reflector, I don't see the type. Below is the sample code: namespace ConsoleApplication2 { class Proggy { public static void Main(stri... | The trick is to use a "persistable module" version of DefineDynamicModule method on the AssemblyBuilder instance. That is, instead of: var module = ab.DefineDynamicModule(ab.GetName().Name); use something like: var module = ab.DefineDynamicModule(ab.GetName().Name, ab.GetName().Name + ".mod"); Thereafter the correspond... | Assembly not saving correctly I have some very simple code to generate an assembly and invoke a method on a contained type. The method gets called and runs correctly, however when I view the generated assembly using Reflector, I don't see the type. Below is the sample code: namespace ConsoleApplication2 { class Proggy ... | TITLE:
Assembly not saving correctly
QUESTION:
I have some very simple code to generate an assembly and invoke a method on a contained type. The method gets called and runs correctly, however when I view the generated assembly using Reflector, I don't see the type. Below is the sample code: namespace ConsoleApplicatio... | [
".net",
"reflection",
"reflection.emit"
] | 5 | 7 | 1,133 | 2 | 0 | 2008-10-11T09:03:31.850000 | 2008-10-11T10:40:12.917000 |
193,896 | 193,900 | What's a good C decompiler? | I am searching for a decompiler for a C program. The binary is a 32-bit x86 Linux executable. Objdump works fine, so basically I am searching for something which attempts to reconstruct the C source from the asm source. | Seconding Hex-rays, but if you can't justify that cost, Boomerang might work. | What's a good C decompiler? I am searching for a decompiler for a C program. The binary is a 32-bit x86 Linux executable. Objdump works fine, so basically I am searching for something which attempts to reconstruct the C source from the asm source. | TITLE:
What's a good C decompiler?
QUESTION:
I am searching for a decompiler for a C program. The binary is a 32-bit x86 Linux executable. Objdump works fine, so basically I am searching for something which attempts to reconstruct the C source from the asm source.
ANSWER:
Seconding Hex-rays, but if you can't justify ... | [
"c",
"linux",
"reverse-engineering",
"decompiling",
"assembly"
] | 89 | 59 | 192,601 | 5 | 32 | 2008-10-11T09:35:21.660000 | 2008-10-11T09:38:36.240000 |
193,916 | 193,921 | How do I programmatically calculate Poker Odds? | I'm trying to write a simple game/utility to calculate poker odds. I know there's plenty of resources that talk about the formulas to do so, but I guess I'm having trouble translating that to code. Particularly, I'm interested in Texas Hold-em... I understand that there are several different approaches, one being that ... | Here are some links to articles, which could help as starting points: Poker Logic in C# and Fast, Texas Holdem Hand Evaluation and Analysis "This code snippet will let you calculate poker probabilities the hard way, using C# and.NET." The theoretical fundamentals are given in this Wikipedia article about Poker Probabil... | How do I programmatically calculate Poker Odds? I'm trying to write a simple game/utility to calculate poker odds. I know there's plenty of resources that talk about the formulas to do so, but I guess I'm having trouble translating that to code. Particularly, I'm interested in Texas Hold-em... I understand that there a... | TITLE:
How do I programmatically calculate Poker Odds?
QUESTION:
I'm trying to write a simple game/utility to calculate poker odds. I know there's plenty of resources that talk about the formulas to do so, but I guess I'm having trouble translating that to code. Particularly, I'm interested in Texas Hold-em... I under... | [
"statistics",
"probability",
"poker"
] | 33 | 23 | 46,679 | 7 | 0 | 2008-10-11T09:57:42.113000 | 2008-10-11T10:01:48.113000 |
193,918 | 194,037 | What is the easiest way to align the Z axis with a vector? | Given a point such as (0, 0, 0) and a vector like (x, y, z). What is the easiest way to align the negative Z-axis centered at (0, 0, 0) to point in the direction of this vector? Examples using OpenGL would be welcome, but not neccessary. | There's lots of different ways to rotate a coordinate-frame to point in a given direction; they'll all leave the z-axis pointed in the direction you want, but with variations in how the x- and y-axes are oriented. The following gets you the shortest rotation, which may or may not be what you want. vec3 target_dir = nor... | What is the easiest way to align the Z axis with a vector? Given a point such as (0, 0, 0) and a vector like (x, y, z). What is the easiest way to align the negative Z-axis centered at (0, 0, 0) to point in the direction of this vector? Examples using OpenGL would be welcome, but not neccessary. | TITLE:
What is the easiest way to align the Z axis with a vector?
QUESTION:
Given a point such as (0, 0, 0) and a vector like (x, y, z). What is the easiest way to align the negative Z-axis centered at (0, 0, 0) to point in the direction of this vector? Examples using OpenGL would be welcome, but not neccessary.
ANSW... | [
"opengl",
"3d",
"vector",
"alignment",
"matrix"
] | 4 | 14 | 13,119 | 5 | 0 | 2008-10-11T09:58:45.920000 | 2008-10-11T12:43:47.223000 |
193,919 | 193,931 | What are good rules of thumb for Python imports? | I am a little confused by the multitude of ways in which you can import modules in Python. import X import X as Y from A import B I have been reading up about scoping and namespaces, but I would like some practical advice on what is the best strategy, under which circumstances and why. Should imports happen at a module... | In production code in our company, we try to follow the following rules. We place imports at the beginning of the file, right after the main file's docstring, e.g.: """ Registry related functionality. """ import wx #... Now, if we import a class that is one of few in the imported module, we import the name directly, so... | What are good rules of thumb for Python imports? I am a little confused by the multitude of ways in which you can import modules in Python. import X import X as Y from A import B I have been reading up about scoping and namespaces, but I would like some practical advice on what is the best strategy, under which circums... | TITLE:
What are good rules of thumb for Python imports?
QUESTION:
I am a little confused by the multitude of ways in which you can import modules in Python. import X import X as Y from A import B I have been reading up about scoping and namespaces, but I would like some practical advice on what is the best strategy, u... | [
"python",
"python-import"
] | 74 | 68 | 53,441 | 10 | 0 | 2008-10-11T09:59:35.903000 | 2008-10-11T10:15:40.457000 |
193,939 | 193,952 | Call and Callvirt | What is the difference between the CIL instructions "Call" and "Callvirt"? | call is for calling non-virtual, static, or superclass methods, i.e., the target of the call is not subject to overriding. callvirt is for calling virtual methods (so that if this is a subclass that overrides the method, the subclass version is called instead). | Call and Callvirt What is the difference between the CIL instructions "Call" and "Callvirt"? | TITLE:
Call and Callvirt
QUESTION:
What is the difference between the CIL instructions "Call" and "Callvirt"?
ANSWER:
call is for calling non-virtual, static, or superclass methods, i.e., the target of the call is not subject to overriding. callvirt is for calling virtual methods (so that if this is a subclass that o... | [
".net",
"reflection",
"cil",
"reflection.emit"
] | 65 | 54 | 21,212 | 6 | 0 | 2008-10-11T10:26:58.780000 | 2008-10-11T10:45:14.327000 |
193,941 | 193,956 | When is a new language the right tool for the job? | For a long time I've been trying different languages to find the feature-set I want and I've not been able to find it. I have languages that fit decently for various projects of mine, but I've come up with an intersection of these languages that will allow me to do 99.9% of my projects in a single language. I want the ... | Sadly, there's no metrics or stories around failed languages. Just successful languages. Clearly, the failures outnumber the successes. What do I base this on? Two common experiences. Once or twice a year, I have to endure a pitch for a product/language/tool/framework that will Absolutely Change Everything. My answer h... | When is a new language the right tool for the job? For a long time I've been trying different languages to find the feature-set I want and I've not been able to find it. I have languages that fit decently for various projects of mine, but I've come up with an intersection of these languages that will allow me to do 99.... | TITLE:
When is a new language the right tool for the job?
QUESTION:
For a long time I've been trying different languages to find the feature-set I want and I've not been able to find it. I have languages that fit decently for various projects of mine, but I've come up with an intersection of these languages that will ... | [
"boo",
"nemerle"
] | 14 | 15 | 1,013 | 10 | 0 | 2008-10-11T10:30:20.160000 | 2008-10-11T10:52:32.847000 |
193,965 | 194,042 | Are there any good open source BDD tools for C/C++? | I love the Ruby RSpec BDD development style. Are there any good tools for doing this with C/C++? | cspec is for C. Presumably it will work with C++. There is a list of tools for various languages on the Behavior Driven Development Wikipedia page. | Are there any good open source BDD tools for C/C++? I love the Ruby RSpec BDD development style. Are there any good tools for doing this with C/C++? | TITLE:
Are there any good open source BDD tools for C/C++?
QUESTION:
I love the Ruby RSpec BDD development style. Are there any good tools for doing this with C/C++?
ANSWER:
cspec is for C. Presumably it will work with C++. There is a list of tools for various languages on the Behavior Driven Development Wikipedia pa... | [
"c++",
"c",
"testing",
"bdd"
] | 22 | 14 | 15,632 | 6 | 0 | 2008-10-11T11:08:54.140000 | 2008-10-11T12:48:09.400000 |
193,973 | 193,978 | How to correctly name a variable which represents a value of 1 - n? | It obviously depends on the context you are using them in but, I was wondering if there is a universally accepted way to name such variables, or at least in a mathematical context. I've often seen: float k = someValue; float oneMinusK = 1 - k;...which seems as descriptive as much as meaningless to me. Please note that ... | In probability 1-k is the probability of X not occurring, given that k is the probability of X occurring. So float will_win_lottery = 0.00000000001; float will_not_win_lottery = 1 - will_win_lottery; | How to correctly name a variable which represents a value of 1 - n? It obviously depends on the context you are using them in but, I was wondering if there is a universally accepted way to name such variables, or at least in a mathematical context. I've often seen: float k = someValue; float oneMinusK = 1 - k;...which ... | TITLE:
How to correctly name a variable which represents a value of 1 - n?
QUESTION:
It obviously depends on the context you are using them in but, I was wondering if there is a universally accepted way to name such variables, or at least in a mathematical context. I've often seen: float k = someValue; float oneMinusK... | [
"variables",
"naming"
] | 2 | 14 | 595 | 8 | 0 | 2008-10-11T11:19:25.303000 | 2008-10-11T11:26:16.570000 |
193,994 | 194,000 | Using function prototypes dynamically in PHP | I'm writing a construct in PHP where a parser determins which function to call dynamically, kind of like this: // The definition of what to call $function_call_spec = array( "prototype" => "myFunction", "parameters" => array( "first_par" => "Hello", "second_par" => "World"));
// Dispatch $funcPrototype = $function_cal... | You should use call_user_func_array which can call any function or method and takes parameteres from an array. Alternatively you can use ReflectionFunction::invokeArgs, but there's no benefit over call_user_func_array unless you already use this class for someting else (like checking whether function you call accepts a... | Using function prototypes dynamically in PHP I'm writing a construct in PHP where a parser determins which function to call dynamically, kind of like this: // The definition of what to call $function_call_spec = array( "prototype" => "myFunction", "parameters" => array( "first_par" => "Hello", "second_par" => "World"))... | TITLE:
Using function prototypes dynamically in PHP
QUESTION:
I'm writing a construct in PHP where a parser determins which function to call dynamically, kind of like this: // The definition of what to call $function_call_spec = array( "prototype" => "myFunction", "parameters" => array( "first_par" => "Hello", "second... | [
"php",
"function-calls"
] | 3 | 11 | 3,849 | 4 | 0 | 2008-10-11T11:42:09.360000 | 2008-10-11T11:49:10.283000 |
194,015 | 194,027 | Users Authentication in ASP.NET | I was wondering, what's the best approach in creating users authentication for my asp.net-mvc web application. Should I use the Forms authentication using a custom MembershipProvider? Or should I implement my own login and registration mechanism for my users? | Seems silly to reinvent the wheel if you don't have a pressing business need to do so. I'd go with forms authentication with a custom provider (if necessary) | Users Authentication in ASP.NET I was wondering, what's the best approach in creating users authentication for my asp.net-mvc web application. Should I use the Forms authentication using a custom MembershipProvider? Or should I implement my own login and registration mechanism for my users? | TITLE:
Users Authentication in ASP.NET
QUESTION:
I was wondering, what's the best approach in creating users authentication for my asp.net-mvc web application. Should I use the Forms authentication using a custom MembershipProvider? Or should I implement my own login and registration mechanism for my users?
ANSWER:
S... | [
"asp.net-mvc",
"authentication"
] | 2 | 3 | 374 | 2 | 0 | 2008-10-11T12:06:57.330000 | 2008-10-11T12:28:04.543000 |
194,032 | 194,074 | What is the best way to implement a petition? (email send after signing the petition) | I need to build a little webapp but I'm not sure what is the best thing to do. A person that subscribe the petition is signing an email sent to X. This will be also saved to a db in order to show online who subscribed. The idea is to have a standard text message, the user submit his name and that name goes into the mes... | Regardless of the whole thing being a "good" idea or not, you want to keep yourself safe. If you spoof the from field, chances are most of your email (especially for domains with SPF records) will not make it through the first level of spam filtering. A SPF (Sender Policy Framework) record lists the only IPs that are a... | What is the best way to implement a petition? (email send after signing the petition) I need to build a little webapp but I'm not sure what is the best thing to do. A person that subscribe the petition is signing an email sent to X. This will be also saved to a db in order to show online who subscribed. The idea is to ... | TITLE:
What is the best way to implement a petition? (email send after signing the petition)
QUESTION:
I need to build a little webapp but I'm not sure what is the best thing to do. A person that subscribe the petition is signing an email sent to X. This will be also saved to a db in order to show online who subscribe... | [
"php",
"design-patterns",
"email"
] | 0 | 3 | 323 | 2 | 0 | 2008-10-11T12:33:06.530000 | 2008-10-11T13:34:21.490000 |
194,035 | 194,070 | Is it possible to download the VS2008 "Test Project" template? | For some reason, my visual studio 2008 installation doesn't have the "Create Test Project" template installed. I'm assuming I should be able to download it from somewhere on MSDN, but I cannot find it anywhere (Guess my Google-Fu is weak) Does anyone know where I can get the template to install it? Thanks EDIT: I've ma... | Have a look a this article about consuming project templates to see if it brings some light to the subject of installing the copied template. You haven't said which client editions are installed on your machine. Test projects are available in Team Edition for Software Testers and in Team Suite. | Is it possible to download the VS2008 "Test Project" template? For some reason, my visual studio 2008 installation doesn't have the "Create Test Project" template installed. I'm assuming I should be able to download it from somewhere on MSDN, but I cannot find it anywhere (Guess my Google-Fu is weak) Does anyone know w... | TITLE:
Is it possible to download the VS2008 "Test Project" template?
QUESTION:
For some reason, my visual studio 2008 installation doesn't have the "Create Test Project" template installed. I'm assuming I should be able to download it from somewhere on MSDN, but I cannot find it anywhere (Guess my Google-Fu is weak) ... | [
"visual-studio-2008",
"templates",
"test-project"
] | 2 | 1 | 1,726 | 1 | 0 | 2008-10-11T12:41:08.383000 | 2008-10-11T13:31:17.300000 |
194,051 | 194,060 | Unicode issues with acts_as_taggable_on_steroids | I'm implementing a blog with tags with some French characters. My question has to do with how to deal with spaces and unicode (utf-8) characters in the url. let's say I have a tag called: ohlàlà! and I have the following code in my tag cloud: <%= link_to h(tag.name.capitalize), {:controller =>:blog,:action =>:tag,:id =... | See ToASCII and ToUnicode in this Wikipedia article. I hope the article has enough pointers to resolve your question. Edit: Though it talks Python, Unicode and permalinks can give an idea about how to encode a solution to your question. To summarize: Basically, the Unicode URL is encoded in UTF8 and each byte of the UT... | Unicode issues with acts_as_taggable_on_steroids I'm implementing a blog with tags with some French characters. My question has to do with how to deal with spaces and unicode (utf-8) characters in the url. let's say I have a tag called: ohlàlà! and I have the following code in my tag cloud: <%= link_to h(tag.name.capit... | TITLE:
Unicode issues with acts_as_taggable_on_steroids
QUESTION:
I'm implementing a blog with tags with some French characters. My question has to do with how to deal with spaces and unicode (utf-8) characters in the url. let's say I have a tag called: ohlàlà! and I have the following code in my tag cloud: <%= link_t... | [
"ruby-on-rails",
"unicode",
"utf-8",
"tags",
"acts-as-taggable-on-ster"
] | 2 | 1 | 226 | 1 | 0 | 2008-10-11T12:59:01.763000 | 2008-10-11T13:14:15.477000 |
194,057 | 346,287 | How do you remove obsolete publications in the Replication Monitor? | Through some bungling in creating and removing publications, I was left with a lot of obsolete publications which for some reason still remains in the Replication Monitor. How do you remove these publications? It doesn't seem to have a clear way to remove them. | This is an old question of mine, but then again at least I found a way to resolve it. I was able to remove the publications is by creating a new publication with the same name, then delete the publication again. This time the publication will no longer appear in the Replication Monitor. I did not remember if the public... | How do you remove obsolete publications in the Replication Monitor? Through some bungling in creating and removing publications, I was left with a lot of obsolete publications which for some reason still remains in the Replication Monitor. How do you remove these publications? It doesn't seem to have a clear way to rem... | TITLE:
How do you remove obsolete publications in the Replication Monitor?
QUESTION:
Through some bungling in creating and removing publications, I was left with a lot of obsolete publications which for some reason still remains in the Replication Monitor. How do you remove these publications? It doesn't seem to have ... | [
"sql-server-2005"
] | 1 | 1 | 2,745 | 2 | 0 | 2008-10-11T13:07:02.827000 | 2008-12-06T13:52:18.090000 |
194,077 | 649,814 | Records not replicated when inserted by custom replication stored procedure | I've just recently setup a custom replication for my subscriber database, as described in another post here. Basically, when the publisher pushes a new record to the subscribers, the stored procedure will also insert a replicated time into an extra column in the table, and insert a new record to a log table. My problem... | I finally have an answer for this problem a few months ago, just that I never got around to update this question. We have to log a support call to Microsoft, but we got a working solution. To resolve the problem, when adding a subscription, you need to run the script like below: sp_addsubscription @publication = 'TEST'... | Records not replicated when inserted by custom replication stored procedure I've just recently setup a custom replication for my subscriber database, as described in another post here. Basically, when the publisher pushes a new record to the subscribers, the stored procedure will also insert a replicated time into an e... | TITLE:
Records not replicated when inserted by custom replication stored procedure
QUESTION:
I've just recently setup a custom replication for my subscriber database, as described in another post here. Basically, when the publisher pushes a new record to the subscribers, the stored procedure will also insert a replica... | [
"sql-server",
"sql-server-2005",
"replication"
] | 1 | 1 | 3,070 | 2 | 0 | 2008-10-11T13:40:09.530000 | 2009-03-16T10:03:44.053000 |
194,086 | 194,099 | ArrayIndexOutOfBoundsException in XMLEntityScanner.peekChar reading XML from HttpRequest | I'm reading XML data from the HttpServletRequest in my servlets doPost() and passing the Reader from req.getReader() to a JAXB unmarshaller. I've tried a couple of different input XMLs but I always get this exception. SEVERE: Servlet.service() for servlet RESTPhotoAdmin threw exception java.lang.ArrayIndexOutOfBoundsEx... | I found an obscure bug XERCESJ-1275 which is itself a duplicate of XERCESJ-1015. The report doesn't mention my stack trace, but does mention a ArrayIndexOutOfBoundsException. The clue was the comment about 0 being a valid (or somewhat valid) response from a Reader's read method, but not from an InputStream according to... | ArrayIndexOutOfBoundsException in XMLEntityScanner.peekChar reading XML from HttpRequest I'm reading XML data from the HttpServletRequest in my servlets doPost() and passing the Reader from req.getReader() to a JAXB unmarshaller. I've tried a couple of different input XMLs but I always get this exception. SEVERE: Servl... | TITLE:
ArrayIndexOutOfBoundsException in XMLEntityScanner.peekChar reading XML from HttpRequest
QUESTION:
I'm reading XML data from the HttpServletRequest in my servlets doPost() and passing the Reader from req.getReader() to a JAXB unmarshaller. I've tried a couple of different input XMLs but I always get this except... | [
"java",
"servlets",
"jaxb",
"xerces"
] | 1 | 1 | 1,396 | 1 | 0 | 2008-10-11T13:50:33.377000 | 2008-10-11T14:07:02.703000 |
194,094 | 194,955 | Model - View - Presenter with Virtual Grid | What is the best breakdown of responsibility when using a virtual grid and the MVP pattern in a winforms application. including: Getting callbacks from the grid on user changed cell updates Callback from the grid to set the style and value of a cell given a row and column | The exact responsibilities in the many patterns that are referred to as Model-View-Presenter vary. Mainly they vary about how much control is exerted over the view by the presenter. Martin Fowler has an in depth discussion of a number of different variants in his chapter on GUI Architectures, it's well worth a read. Ha... | Model - View - Presenter with Virtual Grid What is the best breakdown of responsibility when using a virtual grid and the MVP pattern in a winforms application. including: Getting callbacks from the grid on user changed cell updates Callback from the grid to set the style and value of a cell given a row and column | TITLE:
Model - View - Presenter with Virtual Grid
QUESTION:
What is the best breakdown of responsibility when using a virtual grid and the MVP pattern in a winforms application. including: Getting callbacks from the grid on user changed cell updates Callback from the grid to set the style and value of a cell given a r... | [
"c#",
"winforms",
"grid",
"virtual",
"mvp"
] | 1 | 1 | 1,272 | 2 | 0 | 2008-10-11T13:58:58.383000 | 2008-10-12T01:40:30.917000 |
194,101 | 194,110 | What is the best way to track changes in a form via javascript? | I'd like to track changes in inputs in a form via javascript. My intent is (but not limited) to enable "save" button only when something has changed alert if the user wants to close the page and something is not saved Ideas? | Loop through all the input elements, and put an onchange handler on each. When that fires, set a flag which lets you know the form has changed. A basic version of that would be very easy to set up, but wouldn't be smart enough to recognize if someone changed an input from "a" to "b" and then back to "a". If it were imp... | What is the best way to track changes in a form via javascript? I'd like to track changes in inputs in a form via javascript. My intent is (but not limited) to enable "save" button only when something has changed alert if the user wants to close the page and something is not saved Ideas? | TITLE:
What is the best way to track changes in a form via javascript?
QUESTION:
I'd like to track changes in inputs in a form via javascript. My intent is (but not limited) to enable "save" button only when something has changed alert if the user wants to close the page and something is not saved Ideas?
ANSWER:
Loop... | [
"javascript",
"forms"
] | 52 | 34 | 68,498 | 15 | 0 | 2008-10-11T14:08:07.430000 | 2008-10-11T14:17:47.177000 |
194,102 | 1,861,830 | Retrieve calling url in Java Webservice | We have a web service that is deployed on 2 separate machines in different locations. Is it possible to monitor the url that a person used to call our webservice using java code? We have a 3DNS url set up and we want all clients to use this url as oppossed hitting the boxes directly with the correct port numbers in the... | Have you taken a look at: @Resource WebServiceContext wsContext; This will return the context of the current message sent to your webservice. I've been able to get the IP address of the user from that. This is assuming that you are using Java. | Retrieve calling url in Java Webservice We have a web service that is deployed on 2 separate machines in different locations. Is it possible to monitor the url that a person used to call our webservice using java code? We have a 3DNS url set up and we want all clients to use this url as oppossed hitting the boxes direc... | TITLE:
Retrieve calling url in Java Webservice
QUESTION:
We have a web service that is deployed on 2 separate machines in different locations. Is it possible to monitor the url that a person used to call our webservice using java code? We have a 3DNS url set up and we want all clients to use this url as oppossed hitti... | [
"web-services",
"monitoring"
] | 2 | 2 | 1,740 | 3 | 0 | 2008-10-11T14:09:54.867000 | 2009-12-07T18:09:41.443000 |
194,121 | 194,167 | How to deprecate a function in PHP? | At the team with which I work, we have an old codebase using PHP's ibase_* functions all over the code to communicate with database. We created a wrapper to it that would do something else beside just calling the original function and I did a mass search-replace in the entire code to make sure that wrapper is used inst... | If I understand correct, you want to trigger an error when a built-in PHP function is used? In that case, take a look at the Override Function function. | How to deprecate a function in PHP? At the team with which I work, we have an old codebase using PHP's ibase_* functions all over the code to communicate with database. We created a wrapper to it that would do something else beside just calling the original function and I did a mass search-replace in the entire code to... | TITLE:
How to deprecate a function in PHP?
QUESTION:
At the team with which I work, we have an old codebase using PHP's ibase_* functions all over the code to communicate with database. We created a wrapper to it that would do something else beside just calling the original function and I did a mass search-replace in ... | [
"php",
"deprecated"
] | 42 | 16 | 43,866 | 6 | 0 | 2008-10-11T14:24:55.257000 | 2008-10-11T15:02:27.990000 |
194,125 | 194,130 | Is Ant still the best choice for a Java build tool? | From my small amount of experience, I've only used Ant as a build tool. Are there any other projects which are better, and why? | Maven It is much better than ant because for most common tasks you don't have to write a complicated build.xml, maven has very good defaults and it's all convention over configuration. It has also a big central repository of libraries and it's very easy to configure it to, like, "use latest stable commons-whatever". Ma... | Is Ant still the best choice for a Java build tool? From my small amount of experience, I've only used Ant as a build tool. Are there any other projects which are better, and why? | TITLE:
Is Ant still the best choice for a Java build tool?
QUESTION:
From my small amount of experience, I've only used Ant as a build tool. Are there any other projects which are better, and why?
ANSWER:
Maven It is much better than ant because for most common tasks you don't have to write a complicated build.xml, m... | [
"java",
"ant",
"build",
"build-management"
] | 21 | 23 | 7,112 | 9 | 0 | 2008-10-11T14:29:14.687000 | 2008-10-11T14:31:50.300000 |
194,127 | 194,128 | C# how can you get output of an other batch file? | I have to use an other application (console) to pass some parameter to this program and inside my C# program get the output of that program. I would like not to see the console (all invisible to the user). How can I do that? | Process myProcess = new Process(); ProcessStartInfo myProcessStartInfo = new ProcessStartInfo("YOUPROGRAM_CONSOLE.exe" ); myProcessStartInfo.UseShellExecute = false; myProcessStartInfo.RedirectStandardOutput = true; myProcess.StartInfo = myProcessStartInfo; myProcess.Start();
StreamReader myStreamReader = myProcess.St... | C# how can you get output of an other batch file? I have to use an other application (console) to pass some parameter to this program and inside my C# program get the output of that program. I would like not to see the console (all invisible to the user). How can I do that? | TITLE:
C# how can you get output of an other batch file?
QUESTION:
I have to use an other application (console) to pass some parameter to this program and inside my C# program get the output of that program. I would like not to see the console (all invisible to the user). How can I do that?
ANSWER:
Process myProcess ... | [
"c#",
"io"
] | 5 | 16 | 5,076 | 1 | 0 | 2008-10-11T14:29:40.490000 | 2008-10-11T14:30:25.667000 |
194,147 | 194,160 | Are there good reasons not to use an ORM? | During my apprenticeship, I have used NHibernate for some smaller projects which I mostly coded and designed on my own. Now, before starting some bigger project, the discussion arose how to design data access and whether or not to use an ORM layer. As I am still in my apprenticeship and still consider myself a beginner... | There's been an explosion of growth with ORMs in recent years and your more experienced coworkers may still be thinking in the "every database call should be through a stored procedure" mentality. Why would an ORM make things harder to debug? You'll get the same result whether it comes from a stored proc or from the OR... | Are there good reasons not to use an ORM? During my apprenticeship, I have used NHibernate for some smaller projects which I mostly coded and designed on my own. Now, before starting some bigger project, the discussion arose how to design data access and whether or not to use an ORM layer. As I am still in my apprentic... | TITLE:
Are there good reasons not to use an ORM?
QUESTION:
During my apprenticeship, I have used NHibernate for some smaller projects which I mostly coded and designed on my own. Now, before starting some bigger project, the discussion arose how to design data access and whether or not to use an ORM layer. As I am sti... | [
"c#",
"orm",
"enterprise"
] | 119 | 29 | 52,330 | 20 | 0 | 2008-10-11T14:43:03.753000 | 2008-10-11T14:55:33.450000 |
194,150 | 194,653 | Check if SoundChannel is playing sound | How to check reliably if a SoundChannel is still playing a sound? For example, [Embed(source="song.mp3")] var Song: Class;
var s: Song = new Song(); var ch: SoundChannel = s.play();
// how to check if ch is playing? | I've done a little research and I can't find a way to query any object to determine if a sound is playing. You'll have to write a wrapper class and manage it yourself it seems. package { import flash.events.Event; import flash.media.Sound; import flash.media.SoundChannel;
public class SoundPlayer { [Embed(source="song... | Check if SoundChannel is playing sound How to check reliably if a SoundChannel is still playing a sound? For example, [Embed(source="song.mp3")] var Song: Class;
var s: Song = new Song(); var ch: SoundChannel = s.play();
// how to check if ch is playing? | TITLE:
Check if SoundChannel is playing sound
QUESTION:
How to check reliably if a SoundChannel is still playing a sound? For example, [Embed(source="song.mp3")] var Song: Class;
var s: Song = new Song(); var ch: SoundChannel = s.play();
// how to check if ch is playing?
ANSWER:
I've done a little research and I ca... | [
"flash",
"actionscript-3",
"audio",
"soundchannel"
] | 6 | 11 | 24,899 | 3 | 0 | 2008-10-11T14:46:04.577000 | 2008-10-11T21:11:26.590000 |
194,156 | 194,266 | HCI: UI beyond the WIMP Paradigm | With the popularity of the Apple iPhone, the potential of the Microsoft Surface, and the sheer fluidity and innovation of the interfaces pioneered by Jeff Han of Perceptive Pixel... What are good examples of Graphical User Interfaces which have evolved beyond the Windows, Icons, ( Mouse / Menu ), and Pointer paradigm? | Are you only interested in GUIs? A lot of research has been done and continues to be done on tangible interfaces for example, which fall outside of that category (although they can include computer graphics). The User Interface Wikipedia page might be a good place to start. You might also want to explore the ACM CHI Co... | HCI: UI beyond the WIMP Paradigm With the popularity of the Apple iPhone, the potential of the Microsoft Surface, and the sheer fluidity and innovation of the interfaces pioneered by Jeff Han of Perceptive Pixel... What are good examples of Graphical User Interfaces which have evolved beyond the Windows, Icons, ( Mouse... | TITLE:
HCI: UI beyond the WIMP Paradigm
QUESTION:
With the popularity of the Apple iPhone, the potential of the Microsoft Surface, and the sheer fluidity and innovation of the interfaces pioneered by Jeff Han of Perceptive Pixel... What are good examples of Graphical User Interfaces which have evolved beyond the Windo... | [
"user-interface",
"graphics",
"human-computer-interface",
"wimp"
] | 7 | 8 | 1,448 | 10 | 0 | 2008-10-11T14:52:36.387000 | 2008-10-11T16:19:24.043000 |
194,157 | 194,223 | C# - How to get Program Files (x86) on Windows 64 bit | I'm using: FileInfo( System.Environment.GetFolderPath( System.Environment.SpecialFolder.ProgramFiles) + @"\MyInstalledApp" In order to determine if a program is detected on a users machine (it's not ideal, but the program I'm looking for is a right old kludge of a MS-DOS application, and I couldn't think of another met... | The function below will return the x86 Program Files directory in all of these three Windows configurations: 32 bit Windows 32 bit program running on 64 bit Windows 64 bit program running on 64 bit windows static string ProgramFilesx86() { if( 8 == IntPtr.Size || (!String.IsNullOrEmpty(Environment.GetEnvironmentVariabl... | C# - How to get Program Files (x86) on Windows 64 bit I'm using: FileInfo( System.Environment.GetFolderPath( System.Environment.SpecialFolder.ProgramFiles) + @"\MyInstalledApp" In order to determine if a program is detected on a users machine (it's not ideal, but the program I'm looking for is a right old kludge of a M... | TITLE:
C# - How to get Program Files (x86) on Windows 64 bit
QUESTION:
I'm using: FileInfo( System.Environment.GetFolderPath( System.Environment.SpecialFolder.ProgramFiles) + @"\MyInstalledApp" In order to determine if a program is detected on a users machine (it's not ideal, but the program I'm looking for is a right... | [
"c#",
"windows",
"file",
"64-bit"
] | 156 | 235 | 157,635 | 8 | 0 | 2008-10-11T14:53:12.563000 | 2008-10-11T15:45:38.387000 |
194,168 | 195,013 | How to push pixels faster on the iPhone? | I asked before about pixel-pushing, and have now managed to get far enough to get noise to show up on the screen. Here's how I init: CGDataProviderRef provider; bitmap = malloc(320*480*4); provider = CGDataProviderCreateWithData(NULL, bitmap, 320*480*4, NULL); CGColorSpaceRef colorSpaceRef; colorSpaceRef = CGColorSpace... | The slowness is almost certainly in the noise generation. If you run this in Instruments you'll probably see that a ton of time is spent sitting in your loop. Another smaller issue is your colorspace. If you use the screen's colorspace, you'll avoid a colorspace conversion which is potentially expensive. If you can use... | How to push pixels faster on the iPhone? I asked before about pixel-pushing, and have now managed to get far enough to get noise to show up on the screen. Here's how I init: CGDataProviderRef provider; bitmap = malloc(320*480*4); provider = CGDataProviderCreateWithData(NULL, bitmap, 320*480*4, NULL); CGColorSpaceRef co... | TITLE:
How to push pixels faster on the iPhone?
QUESTION:
I asked before about pixel-pushing, and have now managed to get far enough to get noise to show up on the screen. Here's how I init: CGDataProviderRef provider; bitmap = malloc(320*480*4); provider = CGDataProviderCreateWithData(NULL, bitmap, 320*480*4, NULL); ... | [
"iphone",
"framebuffer",
"pixel"
] | 3 | 2 | 3,576 | 4 | 0 | 2008-10-11T15:04:01.357000 | 2008-10-12T02:39:58.613000 |
194,192 | 195,033 | How can I get notified when the user finishes editing a cell in an NSTableView? | I need to know when the user finishes editing a cell in an NSTableView. The table contains all of the user's calendars (obtained from the CalCalendarStore), so in order for the user's changes to be saved I need to inform the CalCalendarStore of the changes. However, I can't find anything that gets called after the user... | Subclass NSTableView and override textDidEndEditing: (be sure to call super's implementation). This will only be invoked by text fields NSTextFieldCell or NSComboBoxCell (but only when changing the value by typing it, not by selecting the value from the combo's menu). | How can I get notified when the user finishes editing a cell in an NSTableView? I need to know when the user finishes editing a cell in an NSTableView. The table contains all of the user's calendars (obtained from the CalCalendarStore), so in order for the user's changes to be saved I need to inform the CalCalendarStor... | TITLE:
How can I get notified when the user finishes editing a cell in an NSTableView?
QUESTION:
I need to know when the user finishes editing a cell in an NSTableView. The table contains all of the user's calendars (obtained from the CalCalendarStore), so in order for the user's changes to be saved I need to inform t... | [
"cocoa",
"macos"
] | 5 | 2 | 5,666 | 6 | 0 | 2008-10-11T15:20:36.143000 | 2008-10-12T03:03:01.047000 |
194,194 | 194,679 | Application design for processing data prior to database | I have a large collection of data in an excel file (and csv files). The data needs to be placed into a database (mysql). However, before it goes into the database it needs to be processed..for example if columns 1 is less than column 3 add 4 to column 2. There are quite a few rules that must be followed before the info... | If I didn't care to do this in 1 step (as Oli mentions), I'd probably use a pipe and filters design. Since your rules are relatively simple, I'd probably do a couple delegate based classes. For instance (C# code, but Java should be pretty similar...perhaps someone could translate?): interface IFilter { public IEnumerab... | Application design for processing data prior to database I have a large collection of data in an excel file (and csv files). The data needs to be placed into a database (mysql). However, before it goes into the database it needs to be processed..for example if columns 1 is less than column 3 add 4 to column 2. There ar... | TITLE:
Application design for processing data prior to database
QUESTION:
I have a large collection of data in an excel file (and csv files). The data needs to be placed into a database (mysql). However, before it goes into the database it needs to be processed..for example if columns 1 is less than column 3 add 4 to ... | [
"java",
"design-patterns",
"chain-of-responsibility"
] | 3 | 1 | 481 | 8 | 0 | 2008-10-11T15:21:54.877000 | 2008-10-11T21:30:53.777000 |
194,195 | 194,228 | Which is "better": COM DLL or Standard DLL with a Typelib? | I put "better" in quotes because it's a qualitative question. I've been writing COM DLLs for a couple of years now and have only recently come upon, and successfully used, the standard DLL with Typelib concept. Are there any compelling reasons to use COM DLLs instead of DLL+Typelib? Granted, you can't do DCOM with a DL... | TypeLib's are also important if you ever wish to migrate COM components to managed code in the future. Or have managed code interact with the COM components. With a typelib there are lots of tools which will automagically translate your COM signatures into.Net interfaces and types. This can be done by hand but with a l... | Which is "better": COM DLL or Standard DLL with a Typelib? I put "better" in quotes because it's a qualitative question. I've been writing COM DLLs for a couple of years now and have only recently come upon, and successfully used, the standard DLL with Typelib concept. Are there any compelling reasons to use COM DLLs i... | TITLE:
Which is "better": COM DLL or Standard DLL with a Typelib?
QUESTION:
I put "better" in quotes because it's a qualitative question. I've been writing COM DLLs for a couple of years now and have only recently come upon, and successfully used, the standard DLL with Typelib concept. Are there any compelling reasons... | [
"dll",
"typelib",
"com"
] | 6 | 3 | 1,129 | 2 | 0 | 2008-10-11T15:23:27.480000 | 2008-10-11T15:48:27.913000 |
194,208 | 194,270 | Passing data between business layer and data access layer - bad code? | I'm using the following code within the JCProperty class to retrieve data from a DAL: Dim x As JCProperty x = JCPropertyDB.GetProperty(PropertyID)
If Not x Is Nothing Then Me.PropertyID = x.PropertyID Me.AddressLine1 = x.AddressLine1 Me.AddressLine2 = x.AddressLine2 Me.AddressLine3 = x.AddressLine3 Me.AddressCity = x.... | Personally, I'm lazy. I usually do something like: class JCProperty: inherits JCPropertyDB {
New() { MyBase.New()
GetProperty(PropertyID)
} } Then you're basically done, until you have some additional functionality in the JCProperty class that needs to happen "on top" of the functionality already existing in JCPrope... | Passing data between business layer and data access layer - bad code? I'm using the following code within the JCProperty class to retrieve data from a DAL: Dim x As JCProperty x = JCPropertyDB.GetProperty(PropertyID)
If Not x Is Nothing Then Me.PropertyID = x.PropertyID Me.AddressLine1 = x.AddressLine1 Me.AddressLine2... | TITLE:
Passing data between business layer and data access layer - bad code?
QUESTION:
I'm using the following code within the JCProperty class to retrieve data from a DAL: Dim x As JCProperty x = JCPropertyDB.GetProperty(PropertyID)
If Not x Is Nothing Then Me.PropertyID = x.PropertyID Me.AddressLine1 = x.AddressLin... | [
".net",
"vb.net",
"data-access-layer"
] | 0 | 1 | 4,522 | 5 | 0 | 2008-10-11T15:31:49.897000 | 2008-10-11T16:23:14.613000 |
194,241 | 194,335 | Is there a key combination in Xcode to implement a Protocol? | In Visual Studio if I define a class to implement an interface e.g. class MyObject: ISerializable {} I am able to right click on ISerializable, select " Implement Interface " from the context menu and see the appropriate methods appear in my class definition. class MyObject: ISerializable { #region ISerializable Member... | I have not seen that feature in Xcode. But it seems like someone could write a new user script called "Place Implementor Defs on Clipboard" that sits inside of Scripts > Code. You did not find this useful. | Is there a key combination in Xcode to implement a Protocol? In Visual Studio if I define a class to implement an interface e.g. class MyObject: ISerializable {} I am able to right click on ISerializable, select " Implement Interface " from the context menu and see the appropriate methods appear in my class definition.... | TITLE:
Is there a key combination in Xcode to implement a Protocol?
QUESTION:
In Visual Studio if I define a class to implement an interface e.g. class MyObject: ISerializable {} I am able to right click on ISerializable, select " Implement Interface " from the context menu and see the appropriate methods appear in my... | [
"objective-c",
"xcode",
"refactoring",
"code-generation"
] | 29 | 6 | 17,126 | 7 | 0 | 2008-10-11T16:00:13.223000 | 2008-10-11T17:16:35.490000 |
194,247 | 194,259 | How do I create a string from one row of a two dimensional rectangular character array in C#? | I have a 2 dimensional array, like so: char[,] str = new char[2,50]; Now, after I've stored contents in both str[0] and str[1], how do I store it in a string[] s = new string[2];? I tried s[0] = str[0].ToString(); but that seems to be an error: VC# expects 'two' indices within the braces, which means I can convert only... | A jagged array is almost always the best solution for a variety of reasons, and this is one good example. There is so much more flexibility available with an array of arrays than with a multi-dimensional array. In this case, once you have the values in an array of chars, then a constructor on the string class can be us... | How do I create a string from one row of a two dimensional rectangular character array in C#? I have a 2 dimensional array, like so: char[,] str = new char[2,50]; Now, after I've stored contents in both str[0] and str[1], how do I store it in a string[] s = new string[2];? I tried s[0] = str[0].ToString(); but that see... | TITLE:
How do I create a string from one row of a two dimensional rectangular character array in C#?
QUESTION:
I have a 2 dimensional array, like so: char[,] str = new char[2,50]; Now, after I've stored contents in both str[0] and str[1], how do I store it in a string[] s = new string[2];? I tried s[0] = str[0].ToStri... | [
"c#",
"arrays",
"string",
"character",
"multidimensional-array"
] | 1 | 3 | 2,860 | 4 | 0 | 2008-10-11T16:02:09.943000 | 2008-10-11T16:12:29.970000 |
194,261 | 194,288 | RAII in Java... is resource disposal always so ugly? | I just played with Java file system API, and came down with the following function, used to copy binary files. The original source came from the Web, but I added try/catch/finally clauses to be sure that, should something wrong happen, the Buffer Streams would be closed (and thus, my OS ressources freed) before quiting... | The try/finally pattern is the correct way to handle streams in most cases for Java 6 and lower. Some are advocating silently closing streams. Be careful doing this for these reasons: Java: how not to make a mess of stream handling Java 7 introduces try-with-resources: /** transcodes text file from one encoding to anot... | RAII in Java... is resource disposal always so ugly? I just played with Java file system API, and came down with the following function, used to copy binary files. The original source came from the Web, but I added try/catch/finally clauses to be sure that, should something wrong happen, the Buffer Streams would be clo... | TITLE:
RAII in Java... is resource disposal always so ugly?
QUESTION:
I just played with Java file system API, and came down with the following function, used to copy binary files. The original source came from the Web, but I added try/catch/finally clauses to be sure that, should something wrong happen, the Buffer St... | [
"java",
"design-patterns",
"raii",
"resource-management"
] | 17 | 19 | 5,023 | 5 | 0 | 2008-10-11T16:16:24.580000 | 2008-10-11T16:33:45.340000 |
194,278 | 194,303 | What is the best way to mix VB.NET's Option Strict and the new Option Infer directives? | In a related question, my team is about to (hopefully) start using LINQ, and I'd like to take advantage of anonymous types. What is the best way to mix VB.NET's Option Strict (which we've been using through the life of the project) and the new Option Infer directives? | Option Strict and Option Infer do not conflict, so I see no harm in having both on. As a style guide, I prefer to put Option Strict, Explicit, and Infer at the top of each class file - this prevents differences in project or IDE settings from causing issues, and makes it clear what settings are used. | What is the best way to mix VB.NET's Option Strict and the new Option Infer directives? In a related question, my team is about to (hopefully) start using LINQ, and I'd like to take advantage of anonymous types. What is the best way to mix VB.NET's Option Strict (which we've been using through the life of the project) ... | TITLE:
What is the best way to mix VB.NET's Option Strict and the new Option Infer directives?
QUESTION:
In a related question, my team is about to (hopefully) start using LINQ, and I'd like to take advantage of anonymous types. What is the best way to mix VB.NET's Option Strict (which we've been using through the lif... | [
"vb.net",
"linq",
"option-strict",
"option-infer"
] | 10 | 10 | 2,495 | 2 | 0 | 2008-10-11T16:27:45.463000 | 2008-10-11T16:45:39.780000 |
194,304 | 194,307 | What's the best way to write [0..100] in C#? | I'm trying to think of clever, clear, and simple ways to write code that describes the sequence of integers in a given range. Here's an example: IEnumerable EnumerateIntegerRange(int from, int to) { for (int i = from; i <= to; i++) { yield return i; } } | This is already in the framework: Enumerable.Range. For other types, you might be interested in the range classes in my MiscUtil library. | What's the best way to write [0..100] in C#? I'm trying to think of clever, clear, and simple ways to write code that describes the sequence of integers in a given range. Here's an example: IEnumerable EnumerateIntegerRange(int from, int to) { for (int i = from; i <= to; i++) { yield return i; } } | TITLE:
What's the best way to write [0..100] in C#?
QUESTION:
I'm trying to think of clever, clear, and simple ways to write code that describes the sequence of integers in a given range. Here's an example: IEnumerable EnumerateIntegerRange(int from, int to) { for (int i = from; i <= to; i++) { yield return i; } }
AN... | [
"c#",
"linq",
"optimization",
"sequences"
] | 15 | 63 | 4,053 | 4 | 0 | 2008-10-11T16:46:57.810000 | 2008-10-11T16:49:17.027000 |
194,327 | 194,344 | iPhone to iPhone communication | I'm kind of curious how I should approach a problem with iPhones and communication between two phones. I have an idea for an application that needs to send data between two known phones. The problem is that the data could be very small or very large. I want to have intermediate storage on a server and a messaging layer... | Have you given the WiTap sample from Apple a try? It addresses the issue of discoverability (via Bonjour) and connectivity (via basic TCP). It may not be as robust as what you are looking for, but it's worth a look: http://developer.apple.com/iphone/library/samplecode/WiTap/index.html | iPhone to iPhone communication I'm kind of curious how I should approach a problem with iPhones and communication between two phones. I have an idea for an application that needs to send data between two known phones. The problem is that the data could be very small or very large. I want to have intermediate storage on... | TITLE:
iPhone to iPhone communication
QUESTION:
I'm kind of curious how I should approach a problem with iPhones and communication between two phones. I have an idea for an application that needs to send data between two known phones. The problem is that the data could be very small or very large. I want to have inter... | [
"iphone",
"networking",
"mobile",
"upnp"
] | 7 | 4 | 6,674 | 2 | 0 | 2008-10-11T17:11:43.580000 | 2008-10-11T17:26:21.757000 |
194,331 | 194,348 | Adding a method to a domain class | I have a domain class containing a couple of fields. I can access them from my.gsps. I want to add a method to the domain class, which I can call from the.gsps (this method is a kind of virtual field; it's data is not coming directly from the database). How do I add the method and how can I then call it from the.gsps? | To add a method, just write it out like you would any other regular method. It will be available on the object when you display it in your GSP. def someMethod() { return "Hello." } Then in your GSP. ${myObject.someMethod()} | Adding a method to a domain class I have a domain class containing a couple of fields. I can access them from my.gsps. I want to add a method to the domain class, which I can call from the.gsps (this method is a kind of virtual field; it's data is not coming directly from the database). How do I add the method and how ... | TITLE:
Adding a method to a domain class
QUESTION:
I have a domain class containing a couple of fields. I can access them from my.gsps. I want to add a method to the domain class, which I can call from the.gsps (this method is a kind of virtual field; it's data is not coming directly from the database). How do I add t... | [
"grails",
"groovy"
] | 10 | 13 | 5,436 | 3 | 0 | 2008-10-11T17:14:26.773000 | 2008-10-11T17:29:02.953000 |
194,345 | 194,355 | Can't access MySQL server, don't know the password of a root account | For some reason beyond me I can't access the mysql server on a machine. I'm looking at an untouched MT (dv) server with CentOS 5. Any ideas on how to get the root going? | Start (first stop the running one) your MySQL in safemode with skiped grant tables eg.: safe_mysqld --user=mysql --skip-grant-tables --skip-networking Thereafter you should have access to your database without password and could create a new user/password. | Can't access MySQL server, don't know the password of a root account For some reason beyond me I can't access the mysql server on a machine. I'm looking at an untouched MT (dv) server with CentOS 5. Any ideas on how to get the root going? | TITLE:
Can't access MySQL server, don't know the password of a root account
QUESTION:
For some reason beyond me I can't access the mysql server on a machine. I'm looking at an untouched MT (dv) server with CentOS 5. Any ideas on how to get the root going?
ANSWER:
Start (first stop the running one) your MySQL in safem... | [
"mysql",
"centos"
] | 1 | 6 | 1,313 | 1 | 0 | 2008-10-11T17:26:51.600000 | 2008-10-11T17:34:27.840000 |
194,346 | 194,363 | Force iframe to Load Full Frame | I have an HTML page (say welcome.html) which contains an iframe to a page I have no control over (say app.html). The user performs some actions using the app within the iframe and clicks submit. Once they do this, they are taken to a new page (say thanks.jsp), which loads within the iframe. Is there a way in which I ca... | You probably want to use a framebuster, with a base target in case it fails. First: If thanks.jsp is requested via a post request - redirect so it you present the page as the response to a get request. Then: Include framebuster JavaScript: Finally: In case the user doesn't have JavaScript enabled, make sure they don't ... | Force iframe to Load Full Frame I have an HTML page (say welcome.html) which contains an iframe to a page I have no control over (say app.html). The user performs some actions using the app within the iframe and clicks submit. Once they do this, they are taken to a new page (say thanks.jsp), which loads within the ifra... | TITLE:
Force iframe to Load Full Frame
QUESTION:
I have an HTML page (say welcome.html) which contains an iframe to a page I have no control over (say app.html). The user performs some actions using the app within the iframe and clicks submit. Once they do this, they are taken to a new page (say thanks.jsp), which loa... | [
"javascript",
"html",
"iframe",
"frame"
] | 1 | 5 | 4,043 | 2 | 0 | 2008-10-11T17:26:52.067000 | 2008-10-11T17:39:37.673000 |
194,349 | 194,368 | What is the proper way to store app's conf data in Java? | Where do you store user-specific and machine-specific runtime configuration data for J2SE application? (For example, C:\Users\USERNAME\AppData\Roaming on Windows and /home/username on Unix) How do you get these locations in the filesystem in platform-independent way? | That depends on your kind of J2SE Application: J2SE executable JAR file (very simple): use user.home System property to find home-dir. Then make a subdir accordingly (like e.g. PGP, SVN,... do) Java Web Start provides very nice included methods to safe properties. Always user-specific Finally Eclipse RCP: There you hav... | What is the proper way to store app's conf data in Java? Where do you store user-specific and machine-specific runtime configuration data for J2SE application? (For example, C:\Users\USERNAME\AppData\Roaming on Windows and /home/username on Unix) How do you get these locations in the filesystem in platform-independent ... | TITLE:
What is the proper way to store app's conf data in Java?
QUESTION:
Where do you store user-specific and machine-specific runtime configuration data for J2SE application? (For example, C:\Users\USERNAME\AppData\Roaming on Windows and /home/username on Unix) How do you get these locations in the filesystem in pla... | [
"java",
"configuration"
] | 17 | 14 | 9,860 | 6 | 0 | 2008-10-11T17:29:38.740000 | 2008-10-11T17:44:09.520000 |
194,361 | 194,531 | What are some recommended plugins for Trac? | In particular, I need a more full fledged version of Trac to support robust project management, and task tracking. I went through the plugins and literally found over 50 that looked promising. My question is to the admins/users of Trac: which ones are indespensible for making Trac feature complete and which ones should... | Lots of Trac plugins look promising. Unfortunately only a handful really delivers and even then some of them are not properly supported or maintained. They also tend to conflict sometimes. I will not recommend anything for project management specifically but these are the ones which made our live so much easier: TagsPl... | What are some recommended plugins for Trac? In particular, I need a more full fledged version of Trac to support robust project management, and task tracking. I went through the plugins and literally found over 50 that looked promising. My question is to the admins/users of Trac: which ones are indespensible for making... | TITLE:
What are some recommended plugins for Trac?
QUESTION:
In particular, I need a more full fledged version of Trac to support robust project management, and task tracking. I went through the plugins and literally found over 50 that looked promising. My question is to the admins/users of Trac: which ones are indesp... | [
"plugins",
"project-management",
"trac"
] | 34 | 19 | 11,667 | 10 | 0 | 2008-10-11T17:38:11.873000 | 2008-10-11T19:59:56.377000 |
194,382 | 194,452 | what is the difference between using the visitor pattern and an interface? | What is the difference between applying the visitor design pattern to your code and the following approach: interface Dointerface { public void perform(Object o); }
public class T { private Dointerface d; private String s;
public String getS() { return s; }
public T(String s) { this.s = s; }
public void setInterfac... | Two things: In your example you need two methods. The perfom and the setInterface. With a visitor pattern you would only need one method, the perfom, usually called accept. If you need more than one 'performer', you will have to set the performer -via the setInterface method- for each. This makes it impossible to make ... | what is the difference between using the visitor pattern and an interface? What is the difference between applying the visitor design pattern to your code and the following approach: interface Dointerface { public void perform(Object o); }
public class T { private Dointerface d; private String s;
public String getS()... | TITLE:
what is the difference between using the visitor pattern and an interface?
QUESTION:
What is the difference between applying the visitor design pattern to your code and the following approach: interface Dointerface { public void perform(Object o); }
public class T { private Dointerface d; private String s;
pu... | [
"java",
"design-patterns",
"coding-style",
"visitor-pattern"
] | 6 | 4 | 2,291 | 5 | 0 | 2008-10-11T18:02:34.663000 | 2008-10-11T19:04:38.423000 |
194,388 | 194,477 | How to determine MS Access field size via OleDb | The existing application is in C#. During startup the application calls a virtual method to make changes to the database (for example a new revision may need to calculate a new field or something). An open OleDb connection is passed into the method. I need to change a field width. The ALTER TABLE statement is working f... | Not sure if I understand your question completely. But you could query the table for 0 rows (SELECT 1 FROM myTable WHERE 1= 0) And you could use recordet's field collection, refer to that field by name or index and use field's property like size, type etc. Does that help? | How to determine MS Access field size via OleDb The existing application is in C#. During startup the application calls a virtual method to make changes to the database (for example a new revision may need to calculate a new field or something). An open OleDb connection is passed into the method. I need to change a fie... | TITLE:
How to determine MS Access field size via OleDb
QUESTION:
The existing application is in C#. During startup the application calls a virtual method to make changes to the database (for example a new revision may need to calculate a new field or something). An open OleDb connection is passed into the method. I ne... | [
"c#",
"ms-access",
"oledb",
"jet"
] | 1 | 0 | 4,961 | 2 | 0 | 2008-10-11T18:05:51.147000 | 2008-10-11T19:25:45.870000 |
194,397 | 194,399 | How can I obfuscate (protect) JavaScript? | I want to make a JavaScript application that's not open source, and thus I wish to learn how to can obfuscate my JS code? Is this possible? | Obfuscation: Try YUI Compressor. It's a very popular tool, built, enhanced and maintained by the Yahoo UI team. You may also use: Google Closure Compiler UglifyJS UPDATE: This question was originally asked on 2008, and The mentioned technologies are deprecated. you can use: terser - more information in web.dev. Private... | How can I obfuscate (protect) JavaScript? I want to make a JavaScript application that's not open source, and thus I wish to learn how to can obfuscate my JS code? Is this possible? | TITLE:
How can I obfuscate (protect) JavaScript?
QUESTION:
I want to make a JavaScript application that's not open source, and thus I wish to learn how to can obfuscate my JS code? Is this possible?
ANSWER:
Obfuscation: Try YUI Compressor. It's a very popular tool, built, enhanced and maintained by the Yahoo UI team.... | [
"javascript",
"obfuscation",
"source-code-protection"
] | 748 | 430 | 487,113 | 22 | 0 | 2008-10-11T18:17:18.970000 | 2008-10-11T18:21:22.910000 |
194,428 | 194,432 | How to release the memory that has been used for a variable in C? | How can i release the memory that I used for a variable (e.g. a long string) in C? | Assuming that you allocated the memory dynamically (using malloc or another memory allocator) you free it using free. If the memory was statically allocated, you can't free it. | How to release the memory that has been used for a variable in C? How can i release the memory that I used for a variable (e.g. a long string) in C? | TITLE:
How to release the memory that has been used for a variable in C?
QUESTION:
How can i release the memory that I used for a variable (e.g. a long string) in C?
ANSWER:
Assuming that you allocated the memory dynamically (using malloc or another memory allocator) you free it using free. If the memory was statical... | [
"c",
"memory-management"
] | 2 | 14 | 8,615 | 5 | 0 | 2008-10-11T18:43:21.587000 | 2008-10-11T18:44:51.490000 |
194,430 | 194,431 | How do I properly store and retrieve internationalized Strings in properties files? | I'm experimenting with internationalization by making a Hello World program that uses properties files + ResourceBundle to get different strings. Specifically, I have a file "messages_en_US.properties" that stores "hello.world=Hello World!", which works fine of course. I then have a file "messages_ja_JP.properties" whi... | I realized that native2ascii was assuming (surprise) that it was converting from my operating system's default encoding each time, and as such not producing the correct escaped Unicode string. Running native2ascii with the "-encoding encoding_name " option where encoding_name was the name of the source file's encoding ... | How do I properly store and retrieve internationalized Strings in properties files? I'm experimenting with internationalization by making a Hello World program that uses properties files + ResourceBundle to get different strings. Specifically, I have a file "messages_en_US.properties" that stores "hello.world=Hello Wor... | TITLE:
How do I properly store and retrieve internationalized Strings in properties files?
QUESTION:
I'm experimenting with internationalization by making a Hello World program that uses properties files + ResourceBundle to get different strings. Specifically, I have a file "messages_en_US.properties" that stores "hel... | [
"java",
"encoding",
"properties",
"internationalization"
] | 3 | 3 | 3,544 | 3 | 0 | 2008-10-11T18:43:43.147000 | 2008-10-11T18:44:01.460000 |
194,445 | 195,429 | Multi-segmented PalmOS app/library in "background" | the question I am having is: when running my app with a launch code other than sysAppLaunchCmdNormalLaunch, I can not use code outside the default code segment - but could I use a shared library that is multi-segmented, thus circumventing this problem? A bit of background information: I am evaluating the possibility of... | I don't have experience with using shared libraries, but we've had this problem with our software, and we've come across three different ways to solve the problem. Possibly the easiest is to enable Expanded Mode when using the Metrowerks compiler, but I'm not completely certain that this works. This special mode allows... | Multi-segmented PalmOS app/library in "background" the question I am having is: when running my app with a launch code other than sysAppLaunchCmdNormalLaunch, I can not use code outside the default code segment - but could I use a shared library that is multi-segmented, thus circumventing this problem? A bit of backgro... | TITLE:
Multi-segmented PalmOS app/library in "background"
QUESTION:
the question I am having is: when running my app with a launch code other than sysAppLaunchCmdNormalLaunch, I can not use code outside the default code segment - but could I use a shared library that is multi-segmented, thus circumventing this problem... | [
"palm-os",
"garnet-os"
] | 2 | 2 | 213 | 2 | 0 | 2008-10-11T18:55:00.470000 | 2008-10-12T12:26:05.013000 |
194,484 | 194,671 | What's the strangest corner case you've seen in C# or .NET? | I collect a few corner cases and brain teasers and would always like to hear more. The page only really covers C# language bits and bobs, but I also find core.NET things interesting too. For example, here's one which isn't on the page, but which I find incredible: string x = new string(new char[0]); string y = new stri... | I think I showed you this one before, but I like the fun here - this took some debugging to track down! (the original code was obviously more complex and subtle...) static void Foo () where T: new() { T t = new T(); Console.WriteLine(t.ToString()); // works fine Console.WriteLine(t.GetHashCode()); // works fine Console... | What's the strangest corner case you've seen in C# or .NET? I collect a few corner cases and brain teasers and would always like to hear more. The page only really covers C# language bits and bobs, but I also find core.NET things interesting too. For example, here's one which isn't on the page, but which I find incredi... | TITLE:
What's the strangest corner case you've seen in C# or .NET?
QUESTION:
I collect a few corner cases and brain teasers and would always like to hear more. The page only really covers C# language bits and bobs, but I also find core.NET things interesting too. For example, here's one which isn't on the page, but wh... | [
"c#",
".net"
] | 322 | 394 | 123,220 | 37 | 0 | 2008-10-11T19:30:45.407000 | 2008-10-11T21:25:23.693000 |
194,485 | 195,030 | How do I create a dynamic library (dylib) with Xcode? | I'm building few command-line utilities in Xcode (plain C, no Cocoa). I want all of them to use my customized version of libpng, and I want to save space by sharing one copy of the library among all executables (I don't mind re-distributing.dylib with them). Do I need to do some magic to get libpng export symbols? Does... | You probably need to ensure that the dynamic library you build has an exported symbols file that lists what should be exported from the library. It's just a flat list of the symbols, one per line, to export. Also, when your dynamic library is built, it gets an install name embedded within it which is, by default, the p... | How do I create a dynamic library (dylib) with Xcode? I'm building few command-line utilities in Xcode (plain C, no Cocoa). I want all of them to use my customized version of libpng, and I want to save space by sharing one copy of the library among all executables (I don't mind re-distributing.dylib with them). Do I ne... | TITLE:
How do I create a dynamic library (dylib) with Xcode?
QUESTION:
I'm building few command-line utilities in Xcode (plain C, no Cocoa). I want all of them to use my customized version of libpng, and I want to save space by sharing one copy of the library among all executables (I don't mind re-distributing.dylib w... | [
"xcode",
"linker",
"shared-libraries",
"dylib",
"mach-o"
] | 30 | 7 | 65,804 | 4 | 0 | 2008-10-11T19:30:47.450000 | 2008-10-12T03:00:34.077000 |
194,492 | 194,640 | Accessing protected members from subclasses: gcc vs msvc | In visual C++, I can do things like this: template class A{ protected: T i; };
template class B: public A { T geti() {return i;} }; If I try to compile this in g++, I get an error. I have to do this: template class B: public A { T geti() {return A::i;} }; Am I not supposed to do the former in standard C++? Or is somet... | This used to be allowed, but changed in gcc 3.4. In a template definition, unqualified names will no longer find members of a dependent base (as specified by [temp.dep]/3 in the C++ standard). For example, template struct B { int m; int n; int f (); int g (); }; int n; int g (); template struct C: B { void h () { m = 0... | Accessing protected members from subclasses: gcc vs msvc In visual C++, I can do things like this: template class A{ protected: T i; };
template class B: public A { T geti() {return i;} }; If I try to compile this in g++, I get an error. I have to do this: template class B: public A { T geti() {return A::i;} }; Am I n... | TITLE:
Accessing protected members from subclasses: gcc vs msvc
QUESTION:
In visual C++, I can do things like this: template class A{ protected: T i; };
template class B: public A { T geti() {return i;} }; If I try to compile this in g++, I get an error. I have to do this: template class B: public A { T geti() {retur... | [
"c++",
"gcc",
"g++",
"visual-c++"
] | 5 | 6 | 1,563 | 3 | 0 | 2008-10-11T19:40:12.593000 | 2008-10-11T21:02:17.547000 |
194,496 | 194,514 | Static factory methods vs Instance (normal) constructors? | In a language where both are available, would you prefer to see an instance constructor or a static method that returns an instance? For example, if you're creating a String from a char[]: String.FromCharacters(chars); new String(chars); | In Effective Java, 2nd edition, Joshua Bloch certainly recommends the former. There are a few reasons I can remember, and doubtless some I can't: You can give the method a meaningful name. If you've got two ways of constructing an instance both of which take an int, but have different meanings for that int, using a nor... | Static factory methods vs Instance (normal) constructors? In a language where both are available, would you prefer to see an instance constructor or a static method that returns an instance? For example, if you're creating a String from a char[]: String.FromCharacters(chars); new String(chars); | TITLE:
Static factory methods vs Instance (normal) constructors?
QUESTION:
In a language where both are available, would you prefer to see an instance constructor or a static method that returns an instance? For example, if you're creating a String from a char[]: String.FromCharacters(chars); new String(chars);
ANSWE... | [
"design-patterns",
"constructor",
"coding-style"
] | 57 | 67 | 18,783 | 11 | 0 | 2008-10-11T19:41:26.460000 | 2008-10-11T19:48:22.500000 |
194,499 | 194,509 | How to paralleize search for a string in a file with a help of fork? (GNU Linux/g++) | I got a text file with a couple of lines and I am looking for a string in this file. I need to pass following command line parameters to the program: - file path - the string I am looking for - maximum number of processes the program is allowed to "fork" in order to complete this task. How to such a program should be c... | A couple of thoughts. You will have to open the file separately from each process, otherwise they will share a single file descriptor and thus have a shared position in the file (or not, see the comments, as this may be system specific...). You may not see the speed increase you are hoping for due to disk access and/or... | How to paralleize search for a string in a file with a help of fork? (GNU Linux/g++) I got a text file with a couple of lines and I am looking for a string in this file. I need to pass following command line parameters to the program: - file path - the string I am looking for - maximum number of processes the program i... | TITLE:
How to paralleize search for a string in a file with a help of fork? (GNU Linux/g++)
QUESTION:
I got a text file with a couple of lines and I am looking for a string in this file. I need to pass following command line parameters to the program: - file path - the string I am looking for - maximum number of proce... | [
"c++",
"linux",
"file",
"search",
"parallel-processing"
] | 3 | 3 | 490 | 4 | 0 | 2008-10-11T19:42:34.773000 | 2008-10-11T19:46:14.640000 |
194,516 | 195,341 | What is the best way to discover an existing project? | recently I was given the task to discover a C# solution I have never seen before, and give suggestions on refactoring it. I think I will use NDepend (for the first time ever) to see the overall picture, and also to check a lot of code metrics to figure out what could be refactored. NDepend is pretty good at showing the... | Code Discovery is much more easy with NDepend. This tool provides a top-down approach on dependencies and layering between assemblies, namespaces and classes. This is done with some graph and depednencies matrix generated from the code. You'll also get dependencies on tier code assemblies, which is really useful to kno... | What is the best way to discover an existing project? recently I was given the task to discover a C# solution I have never seen before, and give suggestions on refactoring it. I think I will use NDepend (for the first time ever) to see the overall picture, and also to check a lot of code metrics to figure out what coul... | TITLE:
What is the best way to discover an existing project?
QUESTION:
recently I was given the task to discover a C# solution I have never seen before, and give suggestions on refactoring it. I think I will use NDepend (for the first time ever) to see the overall picture, and also to check a lot of code metrics to fi... | [
"c#",
"projects-and-solutions",
"code-discovery"
] | 3 | 4 | 188 | 2 | 0 | 2008-10-11T19:48:48.410000 | 2008-10-12T10:57:19.170000 |
194,520 | 194,647 | Creating standalone Lua executables | Is there an easy way to create standalone.exe files from Lua scripts? Basically this would involve linking the Lua interpreter and the scripts. I believe it is possible (PLT Scheme allows the creation of standalone executables in the same way), but how, exactly? | Check out for srlua. It does what you need. It's from one of the Lua authors. On this address there is also pre-compiled Windows binaries, so that would be even easier for you I think. | Creating standalone Lua executables Is there an easy way to create standalone.exe files from Lua scripts? Basically this would involve linking the Lua interpreter and the scripts. I believe it is possible (PLT Scheme allows the creation of standalone executables in the same way), but how, exactly? | TITLE:
Creating standalone Lua executables
QUESTION:
Is there an easy way to create standalone.exe files from Lua scripts? Basically this would involve linking the Lua interpreter and the scripts. I believe it is possible (PLT Scheme allows the creation of standalone executables in the same way), but how, exactly?
AN... | [
"windows",
"lua"
] | 42 | 32 | 59,625 | 8 | 0 | 2008-10-11T19:50:15.443000 | 2008-10-11T21:08:19.810000 |
194,521 | 194,644 | Multiple deletions using LINQ (more specifically Linq2Nhibernate, but...) | Is there any smart way to do this? If using Linq2Nhibernate, you really seem to have to rely on HQL or the likes to do multiple deletes from a database (without loading up and deleting one by one)? It doesn't seem like Linq2Sql have it either? I just want something that can do stuff like: DELETE FROM Accounts WHERE amo... | The short answer is: you can't. You can do something like: var q = from account in dataContext.Accounts where account.amount < 1000 select account;
dataContext.DeleteAllOnSubmit(q); But, because the framework needs to track concurrency issues it will always execute separate deletes (so if you have 500 rows that would ... | Multiple deletions using LINQ (more specifically Linq2Nhibernate, but...) Is there any smart way to do this? If using Linq2Nhibernate, you really seem to have to rely on HQL or the likes to do multiple deletes from a database (without loading up and deleting one by one)? It doesn't seem like Linq2Sql have it either? I ... | TITLE:
Multiple deletions using LINQ (more specifically Linq2Nhibernate, but...)
QUESTION:
Is there any smart way to do this? If using Linq2Nhibernate, you really seem to have to rely on HQL or the likes to do multiple deletes from a database (without loading up and deleting one by one)? It doesn't seem like Linq2Sql ... | [
".net",
"sql",
"linq",
"nhibernate"
] | 2 | 3 | 390 | 1 | 0 | 2008-10-11T19:50:56.677000 | 2008-10-11T21:05:51.860000 |
194,526 | 194,575 | UDP and my computer? | I recently turned on Windows Firewall logging on my computer and started tracking incoming and outgoing connections. Something curious about the logfiles is that I have noticed numerous UDP packets (in fact, it constitutes basically all of my incoming traffic) that don't have my host as destination or source showing up... | The packets addressed to IPs starting with 239 and 224 are multicast packets. This is a way to address traffic to a group of computers without broadcasting it to an entire network. It is used by various legitimate protocols. 224.0.0.252 is the address used by the Link Local Name Resolution protocol. 239.255.255.250 is ... | UDP and my computer? I recently turned on Windows Firewall logging on my computer and started tracking incoming and outgoing connections. Something curious about the logfiles is that I have noticed numerous UDP packets (in fact, it constitutes basically all of my incoming traffic) that don't have my host as destination... | TITLE:
UDP and my computer?
QUESTION:
I recently turned on Windows Firewall logging on my computer and started tracking incoming and outgoing connections. Something curious about the logfiles is that I have noticed numerous UDP packets (in fact, it constitutes basically all of my incoming traffic) that don't have my h... | [
"windows",
"udp",
"firewall"
] | 0 | 7 | 2,609 | 3 | 0 | 2008-10-11T19:52:40.260000 | 2008-10-11T20:24:44.720000 |
194,528 | 194,651 | LINQ asp.net page against MS Access . | I have a ASP.Net page using ADO to query MS access database and as a learning exercise i would like to incorporate LINQ. I have one simple table called Quotes. The fields are: QuoteID, QuoteDescription, QuoteAuthor, QuoteDate. I would like to run simple queries like, "Give me all quotes after 1995". How would i incorpo... | LINQ to SQL doesn't support Access (that is, there's no Access/Jet provider for LINQ), but you can query a DataSet with LINQ. This means that you fill your DataSet with any possible data from your database that you might need in your results, and then you filter on the client side. After you have a typed DataSet, and y... | LINQ asp.net page against MS Access . I have a ASP.Net page using ADO to query MS access database and as a learning exercise i would like to incorporate LINQ. I have one simple table called Quotes. The fields are: QuoteID, QuoteDescription, QuoteAuthor, QuoteDate. I would like to run simple queries like, "Give me all q... | TITLE:
LINQ asp.net page against MS Access .
QUESTION:
I have a ASP.Net page using ADO to query MS access database and as a learning exercise i would like to incorporate LINQ. I have one simple table called Quotes. The fields are: QuoteID, QuoteDescription, QuoteAuthor, QuoteDate. I would like to run simple queries li... | [
"c#",
"asp.net",
"linq",
"ms-access"
] | 10 | 18 | 17,936 | 2 | 0 | 2008-10-11T19:55:22.190000 | 2008-10-11T21:09:46.797000 |
194,534 | 198,911 | Using Dependency Injection frameworks for classes with many dependencies | I have been looking at various dependency injection frameworks for.NET as I feel the project I am working on would greatly benefit from it. While I think I have a good grasp of the capabilities of these frameworks, I am still a little unclear on how best to introduce them into a large system. Most demos (understandably... | First: Add the simple dependencies to your constructor as needed. There is no need to add every type to every constructor, just add the ones you need. Need another one, just expand the constructor. Performance should not be a big thing as most of these types are likely to be singletons so already created after the firs... | Using Dependency Injection frameworks for classes with many dependencies I have been looking at various dependency injection frameworks for.NET as I feel the project I am working on would greatly benefit from it. While I think I have a good grasp of the capabilities of these frameworks, I am still a little unclear on h... | TITLE:
Using Dependency Injection frameworks for classes with many dependencies
QUESTION:
I have been looking at various dependency injection frameworks for.NET as I feel the project I am working on would greatly benefit from it. While I think I have a good grasp of the capabilities of these frameworks, I am still a l... | [
"dependency-injection"
] | 37 | 6 | 4,276 | 6 | 0 | 2008-10-11T20:02:52.470000 | 2008-10-13T20:27:24.120000 |
194,565 | 194,911 | Anyone out there used vinpower? | I have to implement the VinPower application. They offer a Java version, a C dll and an ActiveX dll, if anyone has an idea on where I could begin, I'd appreciate it. | First step would be to put the VinPOWER Jar file into your lib directory, then restart the server. (Or, you can put the file in a different directory and then add the path in CF Administrator) Then to use it... well, here is their Java sample in CFML: #vp.getAsXML()# Give that a try and see what you get? | Anyone out there used vinpower? I have to implement the VinPower application. They offer a Java version, a C dll and an ActiveX dll, if anyone has an idea on where I could begin, I'd appreciate it. | TITLE:
Anyone out there used vinpower?
QUESTION:
I have to implement the VinPower application. They offer a Java version, a C dll and an ActiveX dll, if anyone has an idea on where I could begin, I'd appreciate it.
ANSWER:
First step would be to put the VinPOWER Jar file into your lib directory, then restart the serv... | [
"coldfusion",
"vin"
] | 0 | 1 | 485 | 2 | 0 | 2008-10-11T20:20:07.473000 | 2008-10-12T00:48:35.827000 |
194,574 | 194,637 | Inserting data in XML file with PHP DOM | I was trying to insert new data into an existing XML file, but it's not working. Here's my xml file: swimming running Now, my idea was making two files: an index page, where it displays what's on the file and provides a field for inserting new elements, and a php page which will insert the data into the XML file. Here'... | is your code block copy and pasted from your existing files? if so i see two potential issues: // should be: note: you're missing action = "insert.php", which would cause the form to just reload itself without submitting, which is the behaviour you describe. secondly, make sure you have write permission to "sample.xml"... | Inserting data in XML file with PHP DOM I was trying to insert new data into an existing XML file, but it's not working. Here's my xml file: swimming running Now, my idea was making two files: an index page, where it displays what's on the file and provides a field for inserting new elements, and a php page which will ... | TITLE:
Inserting data in XML file with PHP DOM
QUESTION:
I was trying to insert new data into an existing XML file, but it's not working. Here's my xml file: swimming running Now, my idea was making two files: an index page, where it displays what's on the file and provides a field for inserting new elements, and a ph... | [
"php",
"xml",
"dom"
] | 6 | 8 | 36,050 | 6 | 0 | 2008-10-11T20:24:40.040000 | 2008-10-11T21:01:06.737000 |
194,579 | 194,618 | How to detect when a user has successfully finished downloading a file in php | I've got a php page which handles requets for file downloads. I need to be able to detect when a file has been downloaded successfully. How can this be done? Perhaps there's some means of detecting this client-side then sending a confirmation down to the server. Thanks. Edit: By handle, I mean that the page is doing so... | Handle the download in a seperate php script (better do a little more than just readfile($file);, you can also provide the ability to resume downloads like in this question ). Then in this script, when you read the last block and send it, you know that all the file was sent. This is not the same as knowing that all was... | How to detect when a user has successfully finished downloading a file in php I've got a php page which handles requets for file downloads. I need to be able to detect when a file has been downloaded successfully. How can this be done? Perhaps there's some means of detecting this client-side then sending a confirmation... | TITLE:
How to detect when a user has successfully finished downloading a file in php
QUESTION:
I've got a php page which handles requets for file downloads. I need to be able to detect when a file has been downloaded successfully. How can this be done? Perhaps there's some means of detecting this client-side then send... | [
"php",
"http-headers",
"attachment"
] | 9 | 11 | 8,553 | 2 | 0 | 2008-10-11T20:27:07.367000 | 2008-10-11T20:48:28.993000 |
194,584 | 195,378 | How do you write good PHP code without the use of a framework? | Other than standard OO concepts, what are some other strategies that allow for producing good, clean PHP code when a framework is not being used? | Remember: MVC, OOP and tiers are design concepts, not language constructs, nor file-structuring. For me, this means that when not using a framework, and when there's not different teams for programming and designing; there's no value in using another template system on top of PHP (which is a template language). Also, s... | How do you write good PHP code without the use of a framework? Other than standard OO concepts, what are some other strategies that allow for producing good, clean PHP code when a framework is not being used? | TITLE:
How do you write good PHP code without the use of a framework?
QUESTION:
Other than standard OO concepts, what are some other strategies that allow for producing good, clean PHP code when a framework is not being used?
ANSWER:
Remember: MVC, OOP and tiers are design concepts, not language constructs, nor file-... | [
"php"
] | 40 | 25 | 10,141 | 10 | 0 | 2008-10-11T20:30:07.767000 | 2008-10-12T11:40:49.753000 |
194,628 | 194,722 | Distinguishing between HFS+ and HFS Standard Volumes | IOKit and the DiskArbitration framework can tell me a lot of things about mounted volumes on a mac, but they don't seem to be able to differentiate between HFS+ and HFS Standard volumes. The IOKit/DA keys Content, DAVolumeKind and DAMediaContent are always Apple_HFS and hfs for both HFS Standard and HFS+ volumes. disku... | There are two ways to do this: Use getattrlist() to retrieve the ATTR_VOL_SIGNATURE attribute for the mount path of the volume. Use the Carbon call FSGetVolumeInfo() and look in the signature field of the returned struct. The signature of a volume is a 16 bit value, usually interpreted as two ASCII characters. The sign... | Distinguishing between HFS+ and HFS Standard Volumes IOKit and the DiskArbitration framework can tell me a lot of things about mounted volumes on a mac, but they don't seem to be able to differentiate between HFS+ and HFS Standard volumes. The IOKit/DA keys Content, DAVolumeKind and DAMediaContent are always Apple_HFS ... | TITLE:
Distinguishing between HFS+ and HFS Standard Volumes
QUESTION:
IOKit and the DiskArbitration framework can tell me a lot of things about mounted volumes on a mac, but they don't seem to be able to differentiate between HFS+ and HFS Standard volumes. The IOKit/DA keys Content, DAVolumeKind and DAMediaContent are... | [
"macos",
"iokit",
"diskarbitration"
] | 1 | 7 | 2,029 | 3 | 0 | 2008-10-11T20:55:53.283000 | 2008-10-11T22:09:37.927000 |
194,650 | 194,961 | 2D Javascript array | Simply put, is there a way to create a 2D javascript array using similar syntax to this? var newArray = [ [0, 1, 2], [3, 4, 5], [6, 7, 8] ] | You can create any n-dimensional arrays using exactly the format you suggest as in the following sample: The alert boxes return, in sequence: 0,1,2 2 0,1,2,3,4,5,6,7,8 10,11,12 12 | 2D Javascript array Simply put, is there a way to create a 2D javascript array using similar syntax to this? var newArray = [ [0, 1, 2], [3, 4, 5], [6, 7, 8] ] | TITLE:
2D Javascript array
QUESTION:
Simply put, is there a way to create a 2D javascript array using similar syntax to this? var newArray = [ [0, 1, 2], [3, 4, 5], [6, 7, 8] ]
ANSWER:
You can create any n-dimensional arrays using exactly the format you suggest as in the following sample: The alert boxes return, in s... | [
"javascript",
"arrays",
"multidimensional-array"
] | 7 | 12 | 16,582 | 3 | 0 | 2008-10-11T21:08:57.253000 | 2008-10-12T01:46:07.690000 |
194,659 | 194,675 | I need my scaled image to be aliased in C# | This might be an odd question, but when I scale my image in C# I need it to be pixelated and not anti-aliased. Just like in MSpaint when you scale. I hope images anti-alias by default in C#, or else I changed something I didn't want to. I've tried playing around with the Graphics.InterpolationMode but no luck there. I'... | Actually, you're right with InterpolationMode, as the docs say. Just set it to InterpolationMode.NearestNeighbor. In your code sample, you never set m_interpolationMode. | I need my scaled image to be aliased in C# This might be an odd question, but when I scale my image in C# I need it to be pixelated and not anti-aliased. Just like in MSpaint when you scale. I hope images anti-alias by default in C#, or else I changed something I didn't want to. I've tried playing around with the Graph... | TITLE:
I need my scaled image to be aliased in C#
QUESTION:
This might be an odd question, but when I scale my image in C# I need it to be pixelated and not anti-aliased. Just like in MSpaint when you scale. I hope images anti-alias by default in C#, or else I changed something I didn't want to. I've tried playing aro... | [
"c#",
"image",
"bitmap"
] | 2 | 3 | 991 | 2 | 0 | 2008-10-11T21:16:30.433000 | 2008-10-11T21:28:25.887000 |
194,663 | 194,682 | Resolving Component libs with Flex SDK mxmlc | I'm new to Flex SDK and trying to implement a simple project using Doug Mccune's CoverFlow widget. Most of the documentation out there on how to do this assumes that one is using Adobe's FlexBuilder product, which is a $250 Eclipse plug-in that I'd rather avoid buying. The problem I'm having is simply getting Doug's sw... | Here is a link to the mxmlc command line tool docs from Adobe and a direct link to the command line options reference. I also find mxmlc -help list to be a good place to start. As another poster recommended, you really want to use library-path to add the path to the directory that contains the swc file. Use the += oper... | Resolving Component libs with Flex SDK mxmlc I'm new to Flex SDK and trying to implement a simple project using Doug Mccune's CoverFlow widget. Most of the documentation out there on how to do this assumes that one is using Adobe's FlexBuilder product, which is a $250 Eclipse plug-in that I'd rather avoid buying. The p... | TITLE:
Resolving Component libs with Flex SDK mxmlc
QUESTION:
I'm new to Flex SDK and trying to implement a simple project using Doug Mccune's CoverFlow widget. Most of the documentation out there on how to do this assumes that one is using Adobe's FlexBuilder product, which is a $250 Eclipse plug-in that I'd rather a... | [
"apache-flex",
"mxml"
] | 6 | 9 | 11,012 | 3 | 0 | 2008-10-11T21:19:39.413000 | 2008-10-11T21:33:11.803000 |
194,676 | 194,741 | What language/platform would you recommend for CPU-bound application? | I'm developing non-interactive cpu-bound application which does only computations, almost no IO. Currently it works too long and while I'm working on improving the algorithm, I also think if it can give any benefit to change language or platform. Currently it is C++ (no OOP so it is almost C) on windows compiled with I... | Just to be thorough: the first thing to do is to gather profile data and the second thing to do is consider your algorithms. I'm sure you know that, but they've got to be #included into any performance-programming discussion. To be direct about your question "Can switching to ASM help?" the answer is "If you don't know... | What language/platform would you recommend for CPU-bound application? I'm developing non-interactive cpu-bound application which does only computations, almost no IO. Currently it works too long and while I'm working on improving the algorithm, I also think if it can give any benefit to change language or platform. Cur... | TITLE:
What language/platform would you recommend for CPU-bound application?
QUESTION:
I'm developing non-interactive cpu-bound application which does only computations, almost no IO. Currently it works too long and while I'm working on improving the algorithm, I also think if it can give any benefit to change languag... | [
"c++",
"performance",
"algorithm"
] | 5 | 16 | 2,328 | 22 | 0 | 2008-10-11T21:28:41.737000 | 2008-10-11T22:23:19.363000 |
194,698 | 194,712 | How to load a jar file at runtime | I was asked to build a java system that will have the ability to load new code (expansions) while running. How do I re-load a jar file while my code is running? or how do I load a new jar? Obviously, since constant up-time is important, I'd like to add the ability to re-load existing classes while at it (if it does not... | Reloading existing classes with existing data is likely to break things. You can load new code into new class loaders relatively easily: ClassLoader loader = URLClassLoader.newInstance( new URL[] { yourURL }, getClass().getClassLoader() ); Class clazz = Class.forName("mypackage.MyClass", true, loader); Class runClass =... | How to load a jar file at runtime I was asked to build a java system that will have the ability to load new code (expansions) while running. How do I re-load a jar file while my code is running? or how do I load a new jar? Obviously, since constant up-time is important, I'd like to add the ability to re-load existing c... | TITLE:
How to load a jar file at runtime
QUESTION:
I was asked to build a java system that will have the ability to load new code (expansions) while running. How do I re-load a jar file while my code is running? or how do I load a new jar? Obviously, since constant up-time is important, I'd like to add the ability to ... | [
"java",
"jar",
"runtime",
"classloader"
] | 77 | 83 | 162,046 | 5 | 0 | 2008-10-11T21:42:22.677000 | 2008-10-11T21:57:09.493000 |
194,725 | 194,883 | How can I make the "find" Command on OS X default to the current directory? | I am a heavy command line user and use the find command extensively in my build system scripts. However on Mac OS X when I am not concentrating I often get output like this: $ find -name \*.plist find: illegal option -- n find: illegal option -- a find: illegal option -- m find: illegal option -- e find: *.plist: No su... | If you can't discipline yourself to use find 'correctly', then why not install GNU find (from findutils ) in a directory on your PATH ahead of the system find command. I used to have my own private variant of cp that would copy files to the current directory if the last item in the list was not a directory. I kept that... | How can I make the "find" Command on OS X default to the current directory? I am a heavy command line user and use the find command extensively in my build system scripts. However on Mac OS X when I am not concentrating I often get output like this: $ find -name \*.plist find: illegal option -- n find: illegal option -... | TITLE:
How can I make the "find" Command on OS X default to the current directory?
QUESTION:
I am a heavy command line user and use the find command extensively in my build system scripts. However on Mac OS X when I am not concentrating I often get output like this: $ find -name \*.plist find: illegal option -- n find... | [
"macos",
"bash",
"command-line",
"find"
] | 15 | 11 | 16,182 | 7 | 0 | 2008-10-11T22:10:24.600000 | 2008-10-12T00:14:57.733000 |
194,733 | 194,745 | Can a Flex 3 method detect the calling object? | If I have a method such as: private function testMethod(param:string):void { // Get the object that called this function } Inside the testMethod, can I work out what object called us? e.g. class A { doSomething() { var b:B = new B(); b.fooBar(); } }
class B { fooBar() { // Can I tell that the calling object is type of... | Sorry the answer is no (see edit below). Functions received a special property called arguments and in AS2 it used to have the property caller that would do roughly what you want. Although the arguments object is still available in AS3 the caller property was removed from AS3 (and therefore Flex 3) so there is no direc... | Can a Flex 3 method detect the calling object? If I have a method such as: private function testMethod(param:string):void { // Get the object that called this function } Inside the testMethod, can I work out what object called us? e.g. class A { doSomething() { var b:B = new B(); b.fooBar(); } }
class B { fooBar() { /... | TITLE:
Can a Flex 3 method detect the calling object?
QUESTION:
If I have a method such as: private function testMethod(param:string):void { // Get the object that called this function } Inside the testMethod, can I work out what object called us? e.g. class A { doSomething() { var b:B = new B(); b.fooBar(); } }
clas... | [
"actionscript-3",
"apache-flex",
"flex3"
] | 2 | 6 | 4,891 | 5 | 0 | 2008-10-11T22:16:24.603000 | 2008-10-11T22:26:03.960000 |
194,742 | 194,789 | How do you determine if an Internet connection is available for your WinForms App? | What is the best way to determine whether there is an available Internet connection for a WinForms app. (Programatically of course) I want to disable/hide certain functions if the user is not connected to the Internet. | The following will determine if you are connected to a network, however, that doesn't necessarily mean that you are connected to the Internet: NetworkInterface.GetIsNetworkAvailable() Here is a C# translation of Steve's code that seems to be pretty good: private static int ERROR_SUCCESS = 0; public static bool IsIntern... | How do you determine if an Internet connection is available for your WinForms App? What is the best way to determine whether there is an available Internet connection for a WinForms app. (Programatically of course) I want to disable/hide certain functions if the user is not connected to the Internet. | TITLE:
How do you determine if an Internet connection is available for your WinForms App?
QUESTION:
What is the best way to determine whether there is an available Internet connection for a WinForms app. (Programatically of course) I want to disable/hide certain functions if the user is not connected to the Internet.
... | [
"c#",
".net",
"winforms"
] | 13 | 15 | 7,405 | 8 | 0 | 2008-10-11T22:23:32.233000 | 2008-10-11T23:05:41.027000 |
194,750 | 201,103 | HTML in an ASP.NET Dynamic Data MultilineText Control | I'm trying to enter a little bit of HTML into an ASP.NET Dynamic Data MultilineText_Edit control, just a couple of tags to have line breaks when I output the value of the column on a web page. However, when I try to click the "Update" link on the Dynamic Data edit page, nothing happens. I don't even get an error messag... | Input validation is a built in feature in ASP.NET 2.0 or later. I don't know why you are not getting an error, but check this out to see if it helps: http://www.asp.net/learn/whitepapers/request-validation/ Check these settings, on the page: <%@ Page validateRequest="false" %> or the web.config: | HTML in an ASP.NET Dynamic Data MultilineText Control I'm trying to enter a little bit of HTML into an ASP.NET Dynamic Data MultilineText_Edit control, just a couple of tags to have line breaks when I output the value of the column on a web page. However, when I try to click the "Update" link on the Dynamic Data edit p... | TITLE:
HTML in an ASP.NET Dynamic Data MultilineText Control
QUESTION:
I'm trying to enter a little bit of HTML into an ASP.NET Dynamic Data MultilineText_Edit control, just a couple of tags to have line breaks when I output the value of the column on a web page. However, when I try to click the "Update" link on the D... | [
"asp.net",
"dynamic-data"
] | 2 | 2 | 874 | 1 | 0 | 2008-10-11T22:31:42.263000 | 2008-10-14T13:14:47.240000 |
194,754 | 194,844 | Rendering UML diagrams from text files | Is there any good tool or tool-chain that allows UML images in the.svg format to be created from a textual source file? The reason for this question is that I want to automate the generation of these images to avoid having to manually create and update this set of images. | UMLGraph is a program for generating UML diagrams (primarily Class Diagrams and Sequence Diagrams) from text based descriptions. It is intended to be used with java source code, but with some alterations, C++ style source code can also be used as described by this blog entry. Quote from the UMLGraph website: The GNU pl... | Rendering UML diagrams from text files Is there any good tool or tool-chain that allows UML images in the.svg format to be created from a textual source file? The reason for this question is that I want to automate the generation of these images to avoid having to manually create and update this set of images. | TITLE:
Rendering UML diagrams from text files
QUESTION:
Is there any good tool or tool-chain that allows UML images in the.svg format to be created from a textual source file? The reason for this question is that I want to automate the generation of these images to avoid having to manually create and update this set o... | [
"automation",
"uml",
"svg"
] | 29 | 12 | 23,448 | 9 | 0 | 2008-10-11T22:39:20.470000 | 2008-10-11T23:45:13.020000 |
194,759 | 194,766 | .Net Form POST | I've got a client that, during testing, is giving me conflicting information. I don't think they are lying but more confused. So, I would like to setup some simple auditing in my ASP.Net application. Specifically, right when any page is called, I want to immediately insert the Querystring and/or form POST data into a l... | All of the form data should be in Request.Params. You'd need to do this on every page, though or maybe use an HttpModule. [EDIT] If you want to get the form parameters separately use Request.Form, along with Request.QueryString | .Net Form POST I've got a client that, during testing, is giving me conflicting information. I don't think they are lying but more confused. So, I would like to setup some simple auditing in my ASP.Net application. Specifically, right when any page is called, I want to immediately insert the Querystring and/or form POS... | TITLE:
.Net Form POST
QUESTION:
I've got a client that, during testing, is giving me conflicting information. I don't think they are lying but more confused. So, I would like to setup some simple auditing in my ASP.Net application. Specifically, right when any page is called, I want to immediately insert the Querystri... | [
"c#",
"asp.net",
"form-post"
] | 1 | 2 | 928 | 3 | 0 | 2008-10-11T22:43:48.637000 | 2008-10-11T22:54:54.293000 |
194,761 | 194,771 | Image Zoom using javascript? | Has anyone got to some good code to zoom into an image using javascript? I know I could just resize it etc but was being lazy and looking for something clever to zoom to different levels, move around when zoomed etc | This really depends on what quality you are after. If you need a hires hiquality image with detailed zoom levels and proper interpolation you will need to write a backend service to serve up zoomed portions of your images. If you have no care for quality or speed, you could download the entire image and fit it to displ... | Image Zoom using javascript? Has anyone got to some good code to zoom into an image using javascript? I know I could just resize it etc but was being lazy and looking for something clever to zoom to different levels, move around when zoomed etc | TITLE:
Image Zoom using javascript?
QUESTION:
Has anyone got to some good code to zoom into an image using javascript? I know I could just resize it etc but was being lazy and looking for something clever to zoom to different levels, move around when zoomed etc
ANSWER:
This really depends on what quality you are afte... | [
"javascript",
"imaging"
] | 2 | 2 | 8,618 | 3 | 0 | 2008-10-11T22:44:50.913000 | 2008-10-11T22:59:21.693000 |
194,790 | 210,581 | In agile like development, who should write test cases? | Our team has a task system where we post small incremental tasks assigned to each developer. Each task is developed in its own branch, and then each branch is tested before being merged to the trunk. My question is: Once the task is done, who should define the test cases that should be done on this task? Ideally I thin... | The Team. If a defect gets to a customer, it is the team's fault, therefore the team should be writing test cases to assure that defects don't reach the customer. The Project Manager (PM) should understand the domain better than anyone on the team. Their domain knowledge is vital to having test cases that make sense wi... | In agile like development, who should write test cases? Our team has a task system where we post small incremental tasks assigned to each developer. Each task is developed in its own branch, and then each branch is tested before being merged to the trunk. My question is: Once the task is done, who should define the tes... | TITLE:
In agile like development, who should write test cases?
QUESTION:
Our team has a task system where we post small incremental tasks assigned to each developer. Each task is developed in its own branch, and then each branch is tested before being merged to the trunk. My question is: Once the task is done, who sho... | [
"testing",
"project-management",
"agile",
"testcase"
] | 16 | 18 | 23,832 | 16 | 0 | 2008-10-11T23:06:04.800000 | 2008-10-16T22:56:12.853000 |
194,795 | 194,952 | Lucene.Net fails at my host because it calls GetTempPath(). What's the work around? | I'm using Lucene.Net in an ASP.NET application on a shared host. Got this stack trace shown below. What's the work around? [SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] Syst... | Here's the answer to my own question. The solution was to modify Lucene.Net.Store.FSDirectory, by commenting out this unused line: // Comments out by Corey Trager, Oct 2008 to workaround permission restrictions at shared host. This is not used. // public static readonly System.String LOCK_DIR = SupportClass.AppSettings... | Lucene.Net fails at my host because it calls GetTempPath(). What's the work around? I'm using Lucene.Net in an ASP.NET application on a shared host. Got this stack trace shown below. What's the work around? [SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorl... | TITLE:
Lucene.Net fails at my host because it calls GetTempPath(). What's the work around?
QUESTION:
I'm using Lucene.Net in an ASP.NET application on a shared host. Got this stack trace shown below. What's the work around? [SecurityException: Request for the permission of type 'System.Security.Permissions.Environment... | [
"asp.net",
"permissions",
"lucene",
"lucene.net"
] | 2 | 2 | 853 | 1 | 0 | 2008-10-11T23:07:26.873000 | 2008-10-12T01:35:36.653000 |
194,821 | 195,423 | Batch node operations in Drupal 5 | What is the most efficient way to go through and update every single node in a drupal site, to, for instance mechanically add tags? Drupal 6 has a shiny new batch API, but what to do in Drupal 5? I started writing a script that keeps a pointer and then goes around all nodes on a cron, loads them and then saves them, bu... | I don't suggest working directly on the database level since some modules might want to update some other related tables. The most reliable and flexible way is to write a script to load, change and save nodes in a loop. You can also try using additional special modules for Drupal 5: Taxonomy Node Operations Taxonomy Mu... | Batch node operations in Drupal 5 What is the most efficient way to go through and update every single node in a drupal site, to, for instance mechanically add tags? Drupal 6 has a shiny new batch API, but what to do in Drupal 5? I started writing a script that keeps a pointer and then goes around all nodes on a cron, ... | TITLE:
Batch node operations in Drupal 5
QUESTION:
What is the most efficient way to go through and update every single node in a drupal site, to, for instance mechanically add tags? Drupal 6 has a shiny new batch API, but what to do in Drupal 5? I started writing a script that keeps a pointer and then goes around all... | [
"drupal"
] | 3 | 4 | 709 | 3 | 0 | 2008-10-11T23:25:16.663000 | 2008-10-12T12:22:35.987000 |
194,842 | 194,880 | Is it possible to do a kind of Link / Button style using CSS with special effects like shadows, outlining of text, and/or gradient? | Is it possible to make such buttons ( http://img225.imageshack.us/img225/6452/buttonslw9.jpg ) using CSS? It should be Menu, and PHP would just feed the text to html/css and css should take care of the design. Maybe I want too much out of CSS - especially with that red outline of the text..? Any ideas how i can achieve... | "Pure" solution is possible in latest Safari with text-shadow, -webkit-text-stroke and -webkit-gradient properties (explained in Safari blog ). You could also use SVG + CSS background-image in Opera 9.5 and Safari. A practical solution that works in more than a couple of cutting-edge browsers is to generate images on t... | Is it possible to do a kind of Link / Button style using CSS with special effects like shadows, outlining of text, and/or gradient? Is it possible to make such buttons ( http://img225.imageshack.us/img225/6452/buttonslw9.jpg ) using CSS? It should be Menu, and PHP would just feed the text to html/css and css should tak... | TITLE:
Is it possible to do a kind of Link / Button style using CSS with special effects like shadows, outlining of text, and/or gradient?
QUESTION:
Is it possible to make such buttons ( http://img225.imageshack.us/img225/6452/buttonslw9.jpg ) using CSS? It should be Menu, and PHP would just feed the text to html/css ... | [
"css",
"graphics"
] | 0 | 1 | 344 | 2 | 0 | 2008-10-11T23:42:23.213000 | 2008-10-12T00:12:23.590000 |
194,846 | 194,906 | Is there hash code function accepting any object type? | Basically, I'm trying to create an object of unique objects, a set. I had the brilliant idea of just using a JavaScript object with objects for the property names. Such as, set[obj] = true; This works, up to a point. It works great with string and numbers, but with other objects, they all seem to "hash" to the same val... | JavaScript objects can only use strings as keys (anything else is converted to a string). You could, alternatively, maintain an array which indexes the objects in question, and use its index string as a reference to the object. Something like this: var ObjectReference = []; ObjectReference.push(obj);
set['ObjectRefere... | Is there hash code function accepting any object type? Basically, I'm trying to create an object of unique objects, a set. I had the brilliant idea of just using a JavaScript object with objects for the property names. Such as, set[obj] = true; This works, up to a point. It works great with string and numbers, but with... | TITLE:
Is there hash code function accepting any object type?
QUESTION:
Basically, I'm trying to create an object of unique objects, a set. I had the brilliant idea of just using a JavaScript object with objects for the property names. Such as, set[obj] = true; This works, up to a point. It works great with string and... | [
"javascript",
"hash",
"set",
"hashcode"
] | 176 | 38 | 288,654 | 20 | 0 | 2008-10-11T23:45:37.763000 | 2008-10-12T00:42:56.663000 |
194,852 | 545,672 | How to concatenate text from multiple rows into a single text string in SQL Server | Consider a database table holding names, with three rows: Peter Paul Mary Is there an easy way to turn this into a single string of Peter, Paul, Mary? | If you are on SQL Server 2017 or Azure, see Mathieu Renda answer. I had a similar issue when I was trying to join two tables with one-to-many relationships. In SQL 2005 I found that XML PATH method can handle the concatenation of the rows very easily. If there is a table called STUDENTS SubjectID StudentName ----------... | How to concatenate text from multiple rows into a single text string in SQL Server Consider a database table holding names, with three rows: Peter Paul Mary Is there an easy way to turn this into a single string of Peter, Paul, Mary? | TITLE:
How to concatenate text from multiple rows into a single text string in SQL Server
QUESTION:
Consider a database table holding names, with three rows: Peter Paul Mary Is there an easy way to turn this into a single string of Peter, Paul, Mary?
ANSWER:
If you are on SQL Server 2017 or Azure, see Mathieu Renda a... | [
"sql",
"sql-server",
"csv",
"string-concatenation",
"group-concat"
] | 2,417 | 1,656 | 3,292,763 | 48 | 0 | 2008-10-11T23:49:59.470000 | 2009-02-13T11:53:52.437000 |
194,863 | 194,870 | Random date in C# | I'm looking for some succinct, modern C# code to generate a random date between Jan 1 1995 and the current date. I'm thinking some solution that utilizes Enumerable.Range somehow may make this more succinct. | private Random gen = new Random(); DateTime RandomDay() { DateTime start = new DateTime(1995, 1, 1); int range = (DateTime.Today - start).Days; return start.AddDays(gen.Next(range)); } For better performance if this will be called repeatedly, create the start and gen (and maybe even range ) variables outside of the fun... | Random date in C# I'm looking for some succinct, modern C# code to generate a random date between Jan 1 1995 and the current date. I'm thinking some solution that utilizes Enumerable.Range somehow may make this more succinct. | TITLE:
Random date in C#
QUESTION:
I'm looking for some succinct, modern C# code to generate a random date between Jan 1 1995 and the current date. I'm thinking some solution that utilizes Enumerable.Range somehow may make this more succinct.
ANSWER:
private Random gen = new Random(); DateTime RandomDay() { DateTime ... | [
"c#",
"datetime",
"random",
"date"
] | 164 | 290 | 139,182 | 11 | 0 | 2008-10-12T00:01:38.090000 | 2008-10-12T00:06:45.693000 |
194,869 | 195,032 | Hardware Acceleration for non-SSL based signing and encryption | I am working on a project that does a large amount of hashing, signing, and both asymmetric and symmetric encryption. Since these steps have a significant effect on our performance and available load, I was wondering if there is a hardware based solution to offloading the work. I have done some surfing to find out, and... | If the algorithms you're working on are standard encryption algorithms like 3DES and AES, there is definitely hardware available. Hifn is the most well known, but Broadcom also has a line of chips from their BlueSteel acquisition a number of years ago. nCipher also has a line of encryption products, though when last I ... | Hardware Acceleration for non-SSL based signing and encryption I am working on a project that does a large amount of hashing, signing, and both asymmetric and symmetric encryption. Since these steps have a significant effect on our performance and available load, I was wondering if there is a hardware based solution to... | TITLE:
Hardware Acceleration for non-SSL based signing and encryption
QUESTION:
I am working on a project that does a large amount of hashing, signing, and both asymmetric and symmetric encryption. Since these steps have a significant effect on our performance and available load, I was wondering if there is a hardware... | [
"windows",
"encryption",
"hardware",
"hash",
"signing"
] | 2 | 1 | 1,079 | 5 | 0 | 2008-10-12T00:05:53.977000 | 2008-10-12T03:02:33.263000 |
194,896 | 194,998 | How can you efficiently check the VM mapping for an address? | I am writing a tracing tool which needs to deal with the output of a a JIT, so the stack can look pretty bizarre at times. I'd like to try to apply some heuristics to addresses to determine if they are code, data or garbage. (If I'm wrong some of the time, it's no big deal; however if the process crashes, not so much.)... | Looking through all the memory-related functions I discovered I can use munlock() to determine if the page is valid. bool is_address_valid(ADDRINT addr) { static int pagesize = getpagesize();
const void *foo = (const void *)(addr / pagesize * pagesize);
if (munlock(foo, 1) == -1) { fprintf(stderr, "munlock(%p=>%p, 1)... | How can you efficiently check the VM mapping for an address? I am writing a tracing tool which needs to deal with the output of a a JIT, so the stack can look pretty bizarre at times. I'd like to try to apply some heuristics to addresses to determine if they are code, data or garbage. (If I'm wrong some of the time, it... | TITLE:
How can you efficiently check the VM mapping for an address?
QUESTION:
I am writing a tracing tool which needs to deal with the output of a a JIT, so the stack can look pretty bizarre at times. I'd like to try to apply some heuristics to addresses to determine if they are code, data or garbage. (If I'm wrong so... | [
"linux",
"memory-management"
] | 1 | 2 | 382 | 1 | 0 | 2008-10-12T00:24:38.497000 | 2008-10-12T02:25:08.440000 |
194,899 | 194,985 | Where does Visual Studio get the type description info used by Intellisense? | Where do the type/member/parameter descriptions that you see in the Intellisense bubble come from? Are they stored in type attributes? EDIT: I'm specifically interested in the built-in types. | The.Net Framework provides an XML documentation file for the shipped assemblies. The IDE reads these documentation files in order to get the descriptions and tooltips for the built-in types. This documentation is typically, but not always, stored in a sub-directory of the framework intsall point. For instance on my mac... | Where does Visual Studio get the type description info used by Intellisense? Where do the type/member/parameter descriptions that you see in the Intellisense bubble come from? Are they stored in type attributes? EDIT: I'm specifically interested in the built-in types. | TITLE:
Where does Visual Studio get the type description info used by Intellisense?
QUESTION:
Where do the type/member/parameter descriptions that you see in the Intellisense bubble come from? Are they stored in type attributes? EDIT: I'm specifically interested in the built-in types.
ANSWER:
The.Net Framework provid... | [
".net",
"visual-studio"
] | 2 | 3 | 767 | 5 | 0 | 2008-10-12T00:31:05.190000 | 2008-10-12T02:10:50.497000 |
194,912 | 194,971 | Any C++ libraries available to convert between floating point representations? | I recently had a need to interpret a DEC 32-bit floating point representation. It differs from the IEEE floating point representations in the number of bits allocated to the exponent and mantissa. Here's a description of a bunch of floating point formats: http://www.quadibloc.com/comp/cp0201.htm I managed to roll my ow... | You mean like libvaxdata? I've never used it - I just found it by googling. But it looks like what you're looking for. It's a C library rather than C++, but converting floating point data should work fine from extern "C" calls. | Any C++ libraries available to convert between floating point representations? I recently had a need to interpret a DEC 32-bit floating point representation. It differs from the IEEE floating point representations in the number of bits allocated to the exponent and mantissa. Here's a description of a bunch of floating ... | TITLE:
Any C++ libraries available to convert between floating point representations?
QUESTION:
I recently had a need to interpret a DEC 32-bit floating point representation. It differs from the IEEE floating point representations in the number of bits allocated to the exponent and mantissa. Here's a description of a ... | [
"c++",
"floating-point"
] | 2 | 3 | 1,645 | 2 | 0 | 2008-10-12T00:49:02.253000 | 2008-10-12T01:55:56.533000 |
194,914 | 194,940 | Adding spaces between strings | What's the best way of adding spaces between strings myString = string.Concat("a"," ","b") or myString = string.Concat("a",Chr(9),"b") I am using stringbuilder to build an XML file and looking for something efficient. Thanks Edit ~ Language VB.NET | Well, for a start, chr(9) is a tab character - you would want to use chr(32) to get a space. That said, the first option, string.Concat("a"," ","b"), is a more readable one. I would be concentrating on getting your code functionally correct to start with. Optimization should always be a last step and targeted only to t... | Adding spaces between strings What's the best way of adding spaces between strings myString = string.Concat("a"," ","b") or myString = string.Concat("a",Chr(9),"b") I am using stringbuilder to build an XML file and looking for something efficient. Thanks Edit ~ Language VB.NET | TITLE:
Adding spaces between strings
QUESTION:
What's the best way of adding spaces between strings myString = string.Concat("a"," ","b") or myString = string.Concat("a",Chr(9),"b") I am using stringbuilder to build an XML file and looking for something efficient. Thanks Edit ~ Language VB.NET
ANSWER:
Well, for a sta... | [
".net",
"xml",
"vb.net",
"string"
] | 2 | 4 | 17,104 | 9 | 0 | 2008-10-12T00:52:18.330000 | 2008-10-12T01:25:04.787000 |
194,930 | 194,974 | How do I use LINQ Contains(string[]) instead of Contains(string) | I got one big question. I got a linq query to put it simply looks like this: from xx in table where xx.uid.ToString().Contains(string[]) select xx The values of the string[] array would be numbers like (1,45,20,10,etc...) the Default for.Contains is.Contains(string). I need it to do this instead:.Contains(string[])... ... | spoulson has it nearly right, but you need to create a List from string[] first. Actually a List would be better if uid is also int. List supports Contains(). Doing uid.ToString().Contains(string[]) would imply that the uid as a string contains all of the values of the array as a substring??? Even if you did write the ... | How do I use LINQ Contains(string[]) instead of Contains(string) I got one big question. I got a linq query to put it simply looks like this: from xx in table where xx.uid.ToString().Contains(string[]) select xx The values of the string[] array would be numbers like (1,45,20,10,etc...) the Default for.Contains is.Conta... | TITLE:
How do I use LINQ Contains(string[]) instead of Contains(string)
QUESTION:
I got one big question. I got a linq query to put it simply looks like this: from xx in table where xx.uid.ToString().Contains(string[]) select xx The values of the string[] array would be numbers like (1,45,20,10,etc...) the Default for... | [
"c#",
"linq",
"string",
"contains"
] | 109 | 90 | 472,809 | 22 | 0 | 2008-10-12T01:14:30.267000 | 2008-10-12T02:01:14.073000 |
194,944 | 196,242 | In C#, what is the best method to format a string as XML? | I am creating a lightweight editor in C# and would like to know the best method for converting a string into a nicely formatted XML string. I would hope that there's a public method in the C# library like "public bool FormatAsXml(string text, out string formattedXmlText)", but it couldn't be that easy, could it? Very s... | string unformattedXml = " Lewis, C.S. The Four Loves "; string formattedXml = XElement.Parse(unformattedXml).ToString(); Console.WriteLine(formattedXml); Output: Lewis, C.S. The Four Loves The Xml Declaration isn't output by ToString(), but it is by Save()... XElement.Parse(unformattedXml).Save(@"C:\doc.xml"); Console.... | In C#, what is the best method to format a string as XML? I am creating a lightweight editor in C# and would like to know the best method for converting a string into a nicely formatted XML string. I would hope that there's a public method in the C# library like "public bool FormatAsXml(string text, out string formatte... | TITLE:
In C#, what is the best method to format a string as XML?
QUESTION:
I am creating a lightweight editor in C# and would like to know the best method for converting a string into a nicely formatted XML string. I would hope that there's a public method in the C# library like "public bool FormatAsXml(string text, o... | [
"c#",
"xml",
"string",
"formatting",
"string-formatting"
] | 43 | 74 | 48,876 | 10 | 0 | 2008-10-12T01:27:01.130000 | 2008-10-12T23:01:07.243000 |
194,995 | 195,005 | How do I find out what exceptions might be thrown by a .NET function? | I might be missing something obvious but is there a reference somewhere about what exceptions are thrown by functions in.NET and why the exception might be thrown? As an example, I was recently trying out Linq in Visual C# 2008 and I was loading an XML file into an XDocument. It was only through testing that I realised... | Nice question, you have 20/20 vision. C#/.NET does not implement the throws statement (i.e., checked exceptions). Anyone coming from a language such as Java is likely to wonder about this. Anders Hejlsberg, the father of C#, explains the rationale behind leaving checked exceptions out of C# in this article/interview. I... | How do I find out what exceptions might be thrown by a .NET function? I might be missing something obvious but is there a reference somewhere about what exceptions are thrown by functions in.NET and why the exception might be thrown? As an example, I was recently trying out Linq in Visual C# 2008 and I was loading an X... | TITLE:
How do I find out what exceptions might be thrown by a .NET function?
QUESTION:
I might be missing something obvious but is there a reference somewhere about what exceptions are thrown by functions in.NET and why the exception might be thrown? As an example, I was recently trying out Linq in Visual C# 2008 and ... | [
".net",
"exception",
"reference"
] | 10 | 8 | 783 | 3 | 0 | 2008-10-12T02:21:43.267000 | 2008-10-12T02:33:38.283000 |
194,999 | 195,290 | Are static class instances unique to a request or a server in ASP.NET? | On an ASP.NET website, are static classes unique to each web request, or are they instantiated whenever needed and GCed whenever the GC decides to disposed of them? The reason I ask is because I've written some static classes before in C# and the behavior is different than I would have expected. I would have expected s... | Your static classes and static instance fields are shared between all requests to the application, and has the same lifetime as the application domain. Therefore, you should be careful when using static instances, since you might have synchronization issues and the like. Also bear in mind, that static instances will no... | Are static class instances unique to a request or a server in ASP.NET? On an ASP.NET website, are static classes unique to each web request, or are they instantiated whenever needed and GCed whenever the GC decides to disposed of them? The reason I ask is because I've written some static classes before in C# and the be... | TITLE:
Are static class instances unique to a request or a server in ASP.NET?
QUESTION:
On an ASP.NET website, are static classes unique to each web request, or are they instantiated whenever needed and GCed whenever the GC decides to disposed of them? The reason I ask is because I've written some static classes befor... | [
"c#",
"asp.net",
"static"
] | 194 | 156 | 77,817 | 5 | 0 | 2008-10-12T02:25:16.457000 | 2008-10-12T09:51:34.513000 |
195,008 | 195,027 | What is code coverage and how do YOU measure it? | What is code coverage and how do YOU measure it? I was asked this question regarding our automating testing code coverage. It seems to be that, outside of automated tools, it is more art than science. Are there any real-world examples of how to use code coverage? | Code coverage is a measurement of how many lines/blocks/arcs of your code are executed while the automated tests are running. Code coverage is collected by using a specialized tool to instrument the binaries to add tracing calls and run a full set of automated tests against the instrumented product. A good tool will gi... | What is code coverage and how do YOU measure it? What is code coverage and how do YOU measure it? I was asked this question regarding our automating testing code coverage. It seems to be that, outside of automated tools, it is more art than science. Are there any real-world examples of how to use code coverage? | TITLE:
What is code coverage and how do YOU measure it?
QUESTION:
What is code coverage and how do YOU measure it? I was asked this question regarding our automating testing code coverage. It seems to be that, outside of automated tools, it is more art than science. Are there any real-world examples of how to use code... | [
"testing",
"computer-science",
"code-coverage"
] | 351 | 307 | 256,231 | 8 | 0 | 2008-10-12T02:35:18.480000 | 2008-10-12T02:54:43.887000 |
195,010 | 481,773 | How can I split multiple joined words? | I have an array of 1000 or so entries, with examples below: wickedweather liquidweather driveourtrucks gocompact slimprojector I would like to be able to split these into their respective words, as: wicked weather liquid weather drive our trucks go compact slim projector I was hoping a regular expression my do the tric... | The Viterbi algorithm is much faster. It computes the same scores as the recursive search in Dmitry's answer above, but in O(n) time. (Dmitry's search takes exponential time; Viterbi does it by dynamic programming.) import re from collections import Counter
def viterbi_segment(text): probs, lasts = [1.0], [0] for i in... | How can I split multiple joined words? I have an array of 1000 or so entries, with examples below: wickedweather liquidweather driveourtrucks gocompact slimprojector I would like to be able to split these into their respective words, as: wicked weather liquid weather drive our trucks go compact slim projector I was hop... | TITLE:
How can I split multiple joined words?
QUESTION:
I have an array of 1000 or so entries, with examples below: wickedweather liquidweather driveourtrucks gocompact slimprojector I would like to be able to split these into their respective words, as: wicked weather liquid weather drive our trucks go compact slim p... | [
"string",
"nlp"
] | 58 | 89 | 36,103 | 16 | 0 | 2008-10-12T02:37:19.897000 | 2009-01-26T23:10:31.063000 |
195,020 | 195,074 | What is the best way to use JavaDoc to document a Java enum? | I've just started using Java's enums in my own projects (I have to use JDK 1.4 at work) and I am confused as to the best practice of using JavaDoc for an enum. I have found that this method works, but the resultant code is a little unrefined: /** * Doc for enum */ public enum Something { /** * First thing */ FIRST_THIN... | To answer the first part of your question, you do have to separate each enum value with a comma. As far as I know, there's no way around that. Personally I don't have a problem with the code the way you've presented it. Seems like a perfectly reasonable way to document an enum to me. | What is the best way to use JavaDoc to document a Java enum? I've just started using Java's enums in my own projects (I have to use JDK 1.4 at work) and I am confused as to the best practice of using JavaDoc for an enum. I have found that this method works, but the resultant code is a little unrefined: /** * Doc for en... | TITLE:
What is the best way to use JavaDoc to document a Java enum?
QUESTION:
I've just started using Java's enums in my own projects (I have to use JDK 1.4 at work) and I am confused as to the best practice of using JavaDoc for an enum. I have found that this method works, but the resultant code is a little unrefined... | [
"java",
"enums",
"javadoc"
] | 50 | 33 | 22,368 | 3 | 0 | 2008-10-12T02:46:54.933000 | 2008-10-12T03:58:53.197000 |
195,036 | 195,047 | Is using a front controller and headers the best way to mimic a response in PHP? | I've been researching PHP frameworks as of late for some personal projects, and it looks like most of them use a front controller to mimic a response. The controller gets the params from the request, and re-routes by sending the appropriate headers depending on the logic. This is the "response". Is this the best way to... | a front controller lends itself quite well to a web environment, allowing you to funnel all requests to your application. since HTTP is stateless, and a user can, in a sense, inadvertently stumble upon parts of your app by accident (ie, hitting random URL's), a front controller allows you to determine the entry point o... | Is using a front controller and headers the best way to mimic a response in PHP? I've been researching PHP frameworks as of late for some personal projects, and it looks like most of them use a front controller to mimic a response. The controller gets the params from the request, and re-routes by sending the appropriat... | TITLE:
Is using a front controller and headers the best way to mimic a response in PHP?
QUESTION:
I've been researching PHP frameworks as of late for some personal projects, and it looks like most of them use a front controller to mimic a response. The controller gets the params from the request, and re-routes by send... | [
"php",
"controller"
] | 1 | 3 | 1,114 | 2 | 0 | 2008-10-12T03:03:55.333000 | 2008-10-12T03:14:34.283000 |
195,058 | 195,064 | Using jQuery, how do you mimic the form serialization for a select with multiple options selected in a $.ajax call? | Below is my $.ajax call, how do I put a selects (multiple) selected values in the data section? $.ajax({ type: "post", url: "http://myServer", dataType: "text", data: { 'service': 'myService', 'program': 'myProgram', 'start': start, 'end': end, }, success: function(request) { result.innerHTML = request; } // End succes... | how about using an array? data: {... 'select': ['value1', 'value2', 'value3'],... }, edit: ah sorry, here's the code, a few caveats: 'select': $('#myselectbox').serializeArray(), in order for serializeArray() to work though, all form elements must have a name attribute. the value of 'select' above will be an array of o... | Using jQuery, how do you mimic the form serialization for a select with multiple options selected in a $.ajax call? Below is my $.ajax call, how do I put a selects (multiple) selected values in the data section? $.ajax({ type: "post", url: "http://myServer", dataType: "text", data: { 'service': 'myService', 'program': ... | TITLE:
Using jQuery, how do you mimic the form serialization for a select with multiple options selected in a $.ajax call?
QUESTION:
Below is my $.ajax call, how do I put a selects (multiple) selected values in the data section? $.ajax({ type: "post", url: "http://myServer", dataType: "text", data: { 'service': 'mySer... | [
"jquery"
] | 5 | 5 | 7,656 | 3 | 0 | 2008-10-12T03:31:57.510000 | 2008-10-12T03:40:54.387000 |
195,061 | 450,076 | How to run NUnit programmatically | I have some assembly that references NUnit and creates a single test class with a single test method. I am able to get the file system path to this assembly (e.g. "C:...\test.dll"). I would like to programmatically use NUnit to run against this assembly. So far I have: var runner = new SimpleTestRunner(); runner.Load(p... | If you want to open in a console mode, add nunit-console-runner.dll reference and use: NUnit.ConsoleRunner.Runner.Main(new string[] { System.Reflection.Assembly.GetExecutingAssembly().Location, }); If you want to open in a gui mode, add nunit-gui-runner.dll reference and use: NUnit.Gui.AppEntry.Main(new string[] { Syst... | How to run NUnit programmatically I have some assembly that references NUnit and creates a single test class with a single test method. I am able to get the file system path to this assembly (e.g. "C:...\test.dll"). I would like to programmatically use NUnit to run against this assembly. So far I have: var runner = new... | TITLE:
How to run NUnit programmatically
QUESTION:
I have some assembly that references NUnit and creates a single test class with a single test method. I am able to get the file system path to this assembly (e.g. "C:...\test.dll"). I would like to programmatically use NUnit to run against this assembly. So far I have... | [
"c#",
".net",
"nunit",
"assembly.load"
] | 18 | 29 | 13,337 | 2 | 0 | 2008-10-12T03:35:38.517000 | 2009-01-16T10:58:50.597000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.