instruction stringlengths 0 30k ⌀ |
|---|
There's a standalone JUnit runner that has a UI, but I recommend using one of the builtin test runners in the Java IDEs (Eclipse, Netbeans, and IntelliJ all have good ones). They all support JUnit, and most support TestNG as well. |
Bug template in Bugzilla |
|bug-tracking|bugzilla| |
Is there any way to enforce a template in Bugzilla to guide users fill in bugs descriptions ?
Actually, i'd like to put some markup texts in the bug description field and avoid the creation of custom fields.
I've installed version 3.2rc1.
Thanks in advance |
Learn about the System.Globalization namespace:
[System.Globalization][1]
Also, a good book is [NET Internationalization: The Developer's Guide to Building Global Windows and Web Applications ][2]
[1]: http://msdn.microsoft.com/en-us/library/system.globalization.aspx
[2]: http://www.amazon.com/NET-Int... |
Your function will be much more robust if you use the first approach. If you need to add another scale, that's one more parameter value to handle. In the second approach, adding another scale means adding as many values as you already had scales on the list, times 2. (For example, to add K to C and F, you'd have to add... |
You should definitely, _definitely_ be working with source control!
This will help stop the collisions that are occurring. Also, if you are making changes to the shared projects this often that it _is_ a problem, then also ensure that all code is **tested before getting checked in** (otherwise they may bust someone ... |
To access the .emacs file for your profile the easiest way is to open up emacs. Then do C-x C-, type in ~USERNAME/.emacs (or you can use init.el or one of the other flavours). Type your stuff into the file and C-x C-s (I think) to save it.
The actual file is located (in Windows XP) in c:\Documents and Settings\USERN... |
I've run both GNU emacs and Xemacs on windows. I used to use it as my primary editor, email client etc, but not it's "just" an editor.
When I recently reinstalled to Vista I installed the latest GNU version. It works fine. So does Xemacs, but it does look like GNU have got their sh*t together so Xemacs isn't as com... |
Just to amplify Lars Truijens answer. [DPack][1] is a [GExperts][2] like plugin for visual studio. I found it great help when moving from the Delphi IDE to Visual Studio.
[1]: http://www.usysware.com/dpack/
[2]: http://www.gexperts.org/ |
Working on a Visual Studio Project with multiple users? |
|visual-studio| |
I just wonder what the best approach is to have multiple users work on a Project in Visual Studio 2005 Professional.
We got a Solution with multiple Class Libraries, but when everyone opens the solution, we keep getting the "X was modified, Reload/Discard?" prompt all the time. Just opening one project is an obvious... |
I just wonder what the best approach is to have multiple users work on a Project in Visual Studio 2005 Professional.
We got a Solution with multiple Class Libraries, but when everyone opens the solution, we keep getting the "X was modified, Reload/Discard?" prompt all the time. Just opening one project is an obvious... |
In WPF you can use FindName method.
XAML:
<ComboBox Name="combo">
<ComboBoxItem Name="item1" >1</ComboBoxItem>
<ComboBoxItem Name="item2">2</ComboBoxItem>
<ComboBoxItem Name="item3">3</ComboBoxItem>
</ComboBox>
Code-behind file
item1.Content = "... |
To output the list into multiple grouped tag you can loop in this fashion.
<cfset list="1,2,3,4,5,6,7,8,9,10,11,12,13,14">
<cfset numberOfColumns = "3">
<cfoutput>
<cfloop from="1" to="#numberOfColumns#" index="col">
<ul>
<cfloop from="#col#" to="#listLen(list)#" index="i" step... |
Here is a way to abstract out the operators that is relatively painless.
abstract class MathProvider<T>
{
public abstract T Divide(T a, T b);
public abstract T Multiply(T a, T b);
public abstract T Add(T a, T b);
public abstract T Negate(T a);
... |
Can't answer your problem unfortunately (though a few years ago I played with jscript.net and it would only be a few lines to build and run that way)
I hit a similar proxy.pac hiccup with a personal work-around-the-office-proxy file a while back - in the end I went with the easiest option and dropped it into its own... |
Just have two threads, one reading from stdout, one from stderr? |
What is the best way to format a localized string in AppleScript? |
|applescript| |
When a script is saved as a bundle, it can use the `localized string` command to find the appropriate string, e.g. in `Contents/Resources/English.lproj/Localizable.strings`. If this is a format string, what is the best way to fill in the placeholders? In other words, what is the AppleScript equivalent of `+[NSString st... |
Try using the *background* instead of the *border*.
It is not the same but it works in IE (take a look at the menu on my site: [www.monex-finance.net][1]).
[1]: http://www.monex-finance.net/ENG/index.php |
The **send()** method is a general-purpose method that can be used on any Class or Object in Ruby. If not overridden, send() accepts a string and calls the name of the method whose string it is passed. For example, if the user clicks the “Clr” button, the ‘press_clear’ string will be sent to the send() method and the... |
The **send()** method is a general-purpose method that can be used on any Class or Object in Ruby. If not overridden, send() accepts a string and calls the name of the method whose string it is passed. For example, if the user clicks the “Clr” button, the ‘press_clear’ string will be sent to the send() method and the... |
Prevent file casing problems in Subversion |
|svn|tortoisesvn| |
We encountered a problem with using Subversion on Windows. A developer committed a file <code>foo.Data.sql</code> and later another developer committed a file called <code>foo.data.sql</code>. Naturally, this caused a problem on Windows clients (all clients are Windows in our environments) because files are case sensit... |
Ctrl-Shift-Enter to move the current line down by one and start typing above it.
Ctrl-Shift-X to capitalize the current selection, Ctrl-Shift-Y to change it lowercase. |
Ctrl+Shift+Enter to move the current line down by one and start typing above it.
Ctrl+Shift+X to capitalize the current selection, Ctrl-Shift-Y to change it lowercase.
Ctrl+. Autocompletes the current word. This works for variables as well as strings (which is a huge timesaver for array keys, for example) |
Your team's taste or your project's coding guidelines.
If you are in a multilanguage environment, you might wish to encourage the use of the same type of quotes for strings that the other language uses, for instance. Else, I personally like best the look of ' |
Check out the [Mono project](http://www.mono-project.com/) |
Check out the [Mono project](http://www.mono-project.com/)
Also have a look at [Silverlight](http://silverlight.net) or [Flash](http://www.adobe.com/products/flash/) for rich internet applications. |
None as far as I know. Although if you look at some code, " " is commonly used for strings of text (I guess ' is more common inside text than "), and ' ' appears in hashkeys and things like that. |
Questioner here, I got to say getting a tool that does not take 5 minutes to answer any click makes it a lot easier to find potential memory leaks.
Since people are suggesting several tools ( I only tried visual wm since I got that in the JDK and JProbe trial ) I though I should suggest a free / open source tool bui... |
How can I evaluate a C# expression dynamically? |
|c#|reflection|eval| |
I would like to do the equivalent of:
object result = Eval("1 + 3");
string now = Eval("System.DateTime.Now().ToString()") as string |
I would like to do the equivalent of:
object result = Eval("1 + 3");
string now = Eval("System.DateTime.Now().ToString()") as string
Following Biri s [link][1], I got this snippet (modified to remove obsolete method `ICodeCompiler.CreateCompiler()`:
private object Eval(string sExpression)
... |
Jeff posted [The great browser javascript shutdown][1]
[<H2>SunSpider JavaScript Benchmark</H2>][2]
[1]: http://www.codinghorror.com/blog/archives/001023.html
[2]: http://www2.webkit.org/perf/sunspider-0.9/sunspider.html |
Jeff posted [The great browser javascript shutdown][1]
[<H2>SunSpider JavaScript Benchmark</H2>][2]
But i wonder where the download link is ;)
[1]: http://www.codinghorror.com/blog/archives/001023.html
[2]: http://www2.webkit.org/perf/sunspider-0.9/sunspider.html |
I could not comment your post, so I have to write a new message. I was able to use the script CreateWebDir.vbs from your link and use it to create/update my virtual directory with only one call:
CreateWebDir.vbs DirName Path 80
If the virtual directory already exists, it changes the path and that's exactly, what ... |
Here's a real simple one:
#include <vector>
#include <string>
using namespace std;
vector<string> split(const char *str, char c = ' ')
{
vector<string> result;
while(1)
{
const char *begin = str;
while(*str != c && *str)
str++;
... |
There are two types of localisation in .NET, both the settings for the cultures can be found in these variables (fire up a .NET command line app on the machine to see what it says):
System.Thread.CurrentThread.CurrentCulture
&
System.Thread.CurrentThread.CurrentUICulture
http://msdn.microsoft.com/en-us/library/... |
There are two types of localisation in .NET, both the settings for the cultures can be found in these variables (fire up a .NET command line app on the machine to see what it says):
System.Thread.CurrentThread.CurrentCulture
&
System.Thread.CurrentThread.CurrentUICulture
http://msdn.microsoft.com/en-us/library/... |
Are you using SQL Server **Express** for a web app? As far as I know, it has some limitations for production deployment.
[SQL Server Express][1] is free and can be redistributed by ISV's (subject to agreement). **SQL Server Express is** **ideal for learning and building desktop and small server applications**. This ... |
Update: Looks like SQL Server express is not the problem as they were using the same product in previous version of the application. I think your next step is in identifying the bottlenecks. If you are sure it is in the database layer, I would recommend taking a profiler trace and bringing down the execution time of th... |
Update: Looks like SQL Server express is not the problem as they were using the same product in previous version of the application. I think your next step is in identifying the bottlenecks. If you are sure it is in the database layer, I would recommend taking a profiler trace and bringing down the execution time of th... |
Isn't this how "fluent interfaces" - like those that JQuery utilizes - are built? One benefit is supposed to be code readability (though the wikipedia entry at http://en.wikipedia.org/wiki/Fluent_interface mentions that some find it *NOT* readable). Another benefit is in code terseness, you lose the need to set prope... |
Seems it had something to do with nesting ajax toolkit UpdatePanel. When I removed the top level panel it was fixed.
Hope this helps if anyone else has the same problem. |
If you ***really*** wanted to, you could override the default behavior of the alert() function. Not saying you ***should*** do this.
Here's an example that uses the YUI library, but you don't have to use YUI to do it:
[YUI-based alert box - replace your ugly javascript alert box][1]
[1]: http://htmlblog.n... |
ToolStrips in TabPages frequently disappear from Windows Forms designer |
|vb.net|winforms|visual-studio| |
I have a Windows Form app with a TabControl. One of the TabPages in the TabControl contains a ToolStrip. Frequently, the Windows Form designer will spontaneously set the Visible property of the Toolstrip to False. To get the toolstrip to reappear in my form, I have to manually find the control and set the property back... |
|.net|visual-studio|winforms|vb.net| |
@Martin
I do architectural validation for x86, so I'm *very* familiar with the architecture the processor provides, but *very un*familiar with how it's used. That's what I based my comment on. If CR2 can be counted on to give the correct answer, then I stand corrected. |
You can't - but here are some options:
- window.open() - make your own dialog
- use prompt() and instruct the user to copy the url
- use JavaScript to just navigate them to the url directly (maybe after using confirm() to ask them)
- include a div on your page with a [FIX IT] button and unhide it
- use... |
I know in Java they're actually thinking about making this standard behaviour for void methods. If you do that you don't need the extra syntactic sugar.
The only downside I can think of is performance. But that's easilly measured. I'll get back to you with the results in a few minutes :-)
|
Instead of giving the number of requests as a fixed value, why not use a scaling factor instead? At the moment, you're treating requests as a limited quantity, and randomising the days on which those requests fall. It would seem more reasonable to treat your requests-per-day as independent.
from datetime import ... |
Consolas for me. These were specially developped for LCD + MS hint engine. Also you might find [ClearType tuner](http://www.microsoft.com/typography/cleartype/tuner/step1.aspx) (MS PowerToy) a great addition as it gives you more control over how your fonts look. |
I was looking for something a litte easier to implement. I will probably have to use this approach. I was also shown by a colleague (thanks PJ) that there is a Scribble tutorial that has been modified to show how to add a Performance Counter using ATL classes:
[PerformanceScribble Sample: Performance Monitoring in a... |
how to represent an empty field in yaml |
|ruby-on-rails|yaml| |
I am working with fixtures on rails and I want one of the fixture fields to be blank.
Example:
two:
name: test
path: - I want this blank but not to act as a group heading.
test: 4
But, I do not know how to leave `path:` blank without it acting as a group title. Does anybody know how to do t... |
1; It is possible, because the two files came from two developers. One is renaming or creating the file with different cases and during commit does not realise that it will be an add not a commit changes.
2; Check [TortoiseSVN FAQ][1]
[1]: http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-rename.htm... |
hmmm.. Just wondering if [Google Calendar Sync][1] lets you do this.
I havent got any shared calendar to try out.
Or have you tried that already?
[1]: http://dl.google.com/googlecalendarsync/GoogleCalendarSync_Installer.exe
|
What is the difference between const and readonly? |
|c#| |
What is the difference between const and readonly and do you use one over the other? |
|c#|.net| |
If the string you have contains one, then you should use the other. For example, "You're able to do this", or 'He said "Hi!"'. Other than that, you should simply be as consistent as you can (within a module, within a package, within a project, within an organisation).
If your code is going to be read by people who... |
Could you avoid this problem by (before displaying the images) you:
1. Put the image references in a structure (array or similar).
2. Have a recursive function build a reverse order structure (or reorder the original).
3. Use the new reversed order structure to build your child windows as before.
It would a... |
Try re-installing the latest MDAC on the server. I once had a similar problem and this solved it.
[http://www.microsoft.com/downloads/details.aspx?familyid=6c050fe3-c795-4b7d-b037-185d0506396c&displaylang=en][1] |
For reference TRUNCATE TABLE also works on MySQL |
If you end up with more than a few returns there may be something wrong with your code. Otherwise I would agree that sometimes it is nice to be able to return from multiple places in a subroutine, especially when it make the code cleaner.
###Perl 6: Bad Example
sub Int_to_String( Int i ){
given( i ){... |
`truncate table` is **not** SQL-platform independent. If you suspect that you **might** ever change database providers, you might be wary of using it. |
The XOR operation is commutative; that is, when XORing all the chars in a string, the order of the chars does not matter. All anagrams of a string will produce the same XOR hash.
In your example, your second string can be generated from your first by swapping the "1" after "...Gen " with the first "2" following it.... |
Your only options are Flash, Java, ActiveX, or writing a custom Firefox extension. Flash is probably your best option - you could write or use an existing Flash app to do the recording and keep almost everything else in pure Javascript.
Why do you want a WAV file? If you're planning to process the actual bits of t... |
`Scalar::Util::reftype()` is the cleanest solution. The Scalar::Util module was added to the Perl core in version 5.7 but is available for older versions (5.004 or later) from CPAN.
You can also probe with `UNIVERSAL::isa()`:
$x->isa('HASH') # if $x is known to be an object
UNIVERSAL::isa($x,... |
Following on from the [accepted answer][1], if you had a public interface and made the private classes implement the interface, you could then return a pointer to the interface and anyone outside of your parent abstract class could then use them (whilst still hiding the child classes).
[1]: http://stackoverflow.... |
_Just a quick note:_
The Erlang "compiling" process described in [Ciaran's](http://blog.ciarang.com/posts/compiling-erlang-on-ubuntu) post (described for Ubuntu 6.10 btw) can be easily skipped using **apt** command in any Debian based distro:
> apt-get install erlang
Do not forget to install these packages... |
If I'm not mistaken LINQ to SQL teats BLOB as System.Byte[]
I recall that there was some problem with SqlMetal, it generated wrong type for BLOB, but MSVS dmbl designer should work. |
I agree with [Nicolas][1] in regards to separating the algorithmic questions from the actual language questions.
One thing that you might want to consider is giving them a couple simple algorithm questions that they can write up the pseudo code for on the white board (ex. "Explain to me the [Bubble sort][2] and sho... |
There are many [ARM microcontroller forums][1] which will help you find what you're looking for.
Atmel has a line of ARM7 processors, and they are pretty friendly to those who make a hobby out of this, so there's a lot of information on this processor. It won't be the same, but generally the tools and libraries can... |
Raymond Chen ([The Old New Thing](http://blogs.msdn.com/oldnewthing/default.aspx)) has a good answer to this sort of question:
>If you have to ask, you're probably doing something wrong.
Here's some Win32 details on stack allocation: [link to MSDN](http://msdn.microsoft.com/en-us/library/ms686774.aspx).
If you t... |
It sounds like you need to upgrade an existing codebase to make it support multiple languages.
If so, the fact that this is on a microcontroller shouldn't be an issue - I'd drop that fromt he title and focus on the language you're using (c?) and ask how to convert your program for internationalisation.
This is a ... |
Would be good to refresh a bit on Unicodes if you are targeting other cultures,languages.
[The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)][1]
[1]: http://www.joelonsoftware.com/articles/Unicode.html |
Depends on the language.
Generally, I'd use separate arguments with enums.
If it's an object oriented language, then I'd recommend a temperature class, with the temperature stored internally however you like and then functions to output it in whatever units are needed:
temp.celsius(); // returns the temperatu... |
Well if it's user specific, check out the *Regional and Language Options* control panel.
<rant>On a side note, kick the developer for not being culture aware when using strings.</rant> |
Robert,
It appears that this can be accomplished with a breadth-first search of the graph. This algorithm should be very fast and scale to large graphs (The graph data structure is sparse so it only uses as much memory as it needs to).
I noticed that the graph you specified above has only one edge that is directi... |
Robert,
It appears that this can be accomplished with a breadth-first search of the graph. **The breadth-first search will find all non-cyclical paths between two nodes.** This algorithm should be very fast and scale to large graphs (The graph data structure is sparse so it only uses as much memory as it needs to).
... |
I would make an enumeration out of the temperature types and pass in the 2 scale parameters. Something like (in c#):
<pre><code>
public void ConvertTemperature(TemperatureTypeEnum SourceTemp, TemperatureTypeEnum TargetTemp, decimal Temperature)
{}
</pre></code>
|
I would make an enumeration out of the temperature types and pass in the 2 scale parameters. Something like (in c#):
<pre><code>
public void ConvertTemperature(TemperatureTypeEnum SourceTemp,
TemperatureTypeEnum TargetTemp,
decimal Temperature)
{}
... |
@jwarzech:<br />
TortoiseSVN: http://tortoisesvn.tigris.org/ <br /><br />
From their website:
<pre>
A Subversion client, implemented as a windows shell extension.
TortoiseSVN is a really easy to use Revision control / version control / source control software for Windows.
Since it's not an integration for a ... |
The link you reference says " This page is specific to Microsoft Visual Studio 2008/.NET Framework 3.5", but you're talking about vs2005.
My guess: a 0-based range of 256 numbers ends at 255, therefore trying to use 256 exceeds that and perhaps they changed it for VS2008
Edit: I looked again and see where that li... |
You cannot limit which dates are selectable in a UIDatePicker. You could change the date when the value changed event is sent, but since the user cannot tell which dates are "good" and which are not, it's a bad UI choice to do so.
Use a UIPickerView of your own making instead. |
Set Google Chrome as the Debugging Browser in Visual Studio |
|visual-studio-2008|google-chrome| |
What Feed Reader libraries for Java are best? |
|java|rss|feed| |