instruction
stringlengths
0
30k
I want to clear the list of projects on the start page...how do I do this? I know I can track it down in the registry, but is there an approved route to go?
|visual-studio|registry|mru|
There are many Test Unit frameforks for C++. CppUnit is certainly not the one I would choose (at least in its stable version 1.x, as it lacks many tests, and requires a lot of redundant lines of codes). So far, my preferred framework is [CxxTest][1], and I plan on evaluating [Fructose][2] some day. Any way, there...
Yes they are. You can search in MSSQL help for CREATE INDEX article it is said there: > "Indexes can be created on a temporary > table. When the table is dropped or > the session ends, all indexes and > triggers are dropped."
You can get stack traces on exceptions by modding the runtime, by the way. The best resource is probably <a href="http://petermodzelewski.blogspot.com/2008/01/development-in-d-with-use-of-backtrace.html">this backtrace hack page</a>
The short answer: 1) backwards compatibility and 2) there's not enough of a difference for it to really matter. For a more detailed explanation, read on. The idiomatic Python approach to such operations is special methods which aren't intended to be called directly. For example, to make <code>x + y</code> work for...
The short answer: 1) backwards compatibility and 2) there's not enough of a difference for it to really matter. For a more detailed explanation, read on. The idiomatic Python approach to such operations is special methods which aren't intended to be called directly. For example, to make <code>x + y</code> work for...
The _Share Project_ action is intended to commit the first version of a project, i.e. one with no _.svn_ metadata in place. It will get upset if it sees _.svn_ directories already there. As Rob wrote, the way to get that checked-out project into Eclipse is to use the import capability.
You vaguely mention "a way to get a more accurate centroid". Maybe you're talking about about a centroid that isn't affected by outliers. For example, the <i>average</i> household income in the USA is probably very high, because a small number of <i>very</i> rich people skew the average; they are the "outliers". For...
You vaguely mention "a way to get a more accurate centroid". Maybe you're talking about a centroid that isn't affected by outliers. For example, the <i>average</i> household income in the USA is probably very high, because a small number of <i>very</i> rich people skew the average; they are the "outliers". For that ...
@[Kevin Conner]: Pretty close, so far as I know. The only other thing to consider is turning on `kill-whole-line` to include the newline in the C-k.
We've been using this on our code: class String def self.random(length=10) ('a'..'z').sort_by {rand}[0,length].join end end The maximum length supported is 25 (we're only using it with the default anyway, so hasn't been a problem). Someone mentioned that 'a'..'z'...
Is there a plugin in Eclipse for applying tags to files ?
Well, in principle, a user could do this: (flet ((= (&rest args) nil)) (multp 40 10)) which would evaluate to NIL... except that ANSI CL makes it illegal to rebind most standard symbols, including CL:=, so you're on the safe side in this particular case. In generial, of course, you should be aware o...
Two ways: (a) Don't use generics. It's probably not necessary in this case. (Although that depends on the code you havn't shown.) (b) Generify AbstractNodeType as follows: public abstract class AbstractNodeType<T extends AbstractNode> { public abstract T createInstance(); } public class Th...
That's a very general question, and there are some inconsistencies. While it is a not 100% rule, most console applications run to completion, whereas GUI applications run until the user terminates them (And services run until stopped via the SCM). Hence, it's easier to request a GUI to close. You send them the equiv...
Drawing a line is simply joining two points, and drawing a scaling incrementing (x0,y0) and(x1,y1) in a particular direction, through X, and/or through Y. This boils down to, in the scale case, which direction(s) stepping occurs (maybe both directions for fun). template< int XIncrement, YIncrement > struct...
Rails or grails ?
|ruby|ruby-on-rails|groovy|grails|
your answer on how to store the data depends entirely on what you're going to do with the data. for example, if you only ever need to retrieve by specifying the date or a date range, then storing in a database as a BLOB makes some sense. but if you need to find records that have certain values, you'll need to do someth...
I have a few detailed blog postings about this on my blog site, [mitchelsellers.com][1]. I personally use the WAP development model and I do NOT check the DNN solution, or any core files into source control, as I do NOT modify the core for any of my clients. When working with multiple people we create a similar env...
You can't. Best thing to do is wrap it in a proxy object, and then mock that. Alternatively, you'd have to use a mock framework that can intercept types that can't be mocked, like TypeMock. But you're talking about bucks, there. Better to do a little wrapping.
For periods less than a day, just use seconds as other have said. For longer periods, it depends on your db engine. If SQL Server, prior to version 2008 you want a datetime. It's okay- you can just ignore the default 1/1/1900 date they'll all have. If you are fortunate enough to have sql server 2008, then there...
For periods less than a day, just use seconds as other have said. For longer periods, it depends on your db engine. If SQL Server, prior to version 2008 you want a datetime. It's okay- you can just ignore the default 1/1/1900 date they'll all have. If you are fortunate enough to have sql server 2008, then there...
It should be compatible. The [CPAN Tester's matrix](http://bbbike.radzeit.de/~slaven/cpantestersmatrix.cgi?dist=Error+0.17015) shows no failures for Perl 5.8.8 on any platform. Per the [README](http://search.cpan.org/src/UARUN/Error-0.15/README), you can install it by doing: perl Makefile.pl make ma...
Since no one has actually given the answer requested, here it is: "\x0d\x0a"
JAI (Java Advanced Imaging API) would do the work but it has some drawbacks. The API is far from being easy to use, especially if you care about memory footprint... IMHO Java is not the best platform for imaging tasks. You might try [ImageMagick][1], a wonderful command line tool, used by popular sites such as F...
|java|eclipse-plugin|
I have searched for such a plugin but haven't found any. I need a facility to "tag" my java files. Similar to tagging on stackoverflow. I want to be able to group my files based on projects/tasks I wam working on. Mylyn helps a little but it dynamically changes the context (list of resources associated with a task) ...
*S60 on Symbian OS* has alot of interesting open source projects happening in/for many environments Some interesting ones:- Python: [http://sourceforge.net/projects/pys60][1] Ruby: [http://ruby-symbian.rubyforge.org/][2] Mozilla: [https://wiki.mozilla.org/Mobile/Symbian/NSPR][3] S60Webkit: [http://o...
*S60 on Symbian OS* has alot of interesting projects happening relating to desktop/server languages to move applications mobile. Some interesting ones:- Python: [http://sourceforge.net/projects/pys60] [1] <BR> Ruby: [http://ruby-symbian.rubyforge.org/][2] <BR> Mozilla: [https://wiki.mozilla.org/Mobile/Symbian/N...
How best to generate a random string in Ruby
|ruby|random|passwords|
I'm currently using the following to generate an 8 character psydo random upper case string [A-Z] value = ""; 8.times{value << (65 + rand(25)).chr} but it looks junky, and since it isn't a single statement it can't be passed as an argument. To get a mixed case string [a-zA-Z] I further hack into it with ...
I'm currently using the following to generate an 8 character pseudo random upper case string [A-Z] value = ""; 8.times{value << (65 + rand(25)).chr} but it looks junky, and since it isn't a single statement it can't be passed as an argument. To get a mixed case string [a-zA-Z] I further hack into it with ...
Grails vs rails .Which got better support?And which one is better to develop medium size apps ?Most importantly which one got more number of plugings
What is the best resource for learning about Safety Critical Systems Development (C/C++)
|system|safetycritical|
I'm looking to locate a good resource (book or otherwise) on safety critical systems development techniques/methodologies, especially something that will cover both hardware and software . I have a sound working knowledge of C/C++, so even if it is just code on SourceForge etc I would still appreciate a link to it to h...
Here's a 3.5 variation that makes it available to all classes using an extension method. public static bool IsSerializable(this object obj) { if (obj is ISerializable) return true; return Attribute.IsDefined(obj.GetType(), typeof(SerializableAttribute)); }
Where a team is already used to pair programming, then adding another developer *who is already skilled at pairing* may not slow the project down, particularly if development is proceeding with a TDD style. The new developer will slowly become more productive as they understand the code base more, and any misunderst...
Not possible, and that's a good thing. A String is a String. It's behaviour is defined, deviating from it would be evil. Also, it's marked final, meaning you couldn't subclass it even if you wanted to.
I've used the pspell http://uk.php.net/pspell package to do this. Take the search term, check the spelling. If its not OK, PSPELL will make suggestions. You can even run the suggestions though your search, count the results, and then say: Your search for "foo" returned 0 results. Did you mean "baz" (12 results) o...
If your server comes offline every once and a while I cannot see how you can avoid to poll it to check that it is alive.
- [Refactor! Pro][1] - Commercial. Free version available. - [GhostDoc][2] - Free - [Comment Reflower][3] - Free - [Versioning Controlled Build][4] - Free [1]: http://www.devexpress.com/Products/Visual_Studio_Add-in/Refactoring/ [2]: http://www.roland-weigelt.de/ghostdoc/ [3]: http://commentrefl...
Some of the .NET Framework controls oddly do not expose all the features of the underlying Windows control that they wrap. In this case, for some reason the `ES_NUMBER` style has not been implemented. You could possibly handle the HandleCreated event (or override OnHandleCreated, as TextBox isn't sealed) and call [S...
Whenever we had stored procedures that were common to multiple applications, we would create a database just for those procedures (and views and tables, etc). That database (we named "base") would then have a developer (or team) responsible for it (maintenance and testing). If a different team needed new functional...
Some other things to keep in mind: * When using ASP.Net you don't have complete control over the ID of elements, so you pretty much have to use class. * It's best to use _neither_, when you can help it. Instead, specify the _element type_ and it's _parent's type_. For example, an unordered list contained inside...
No, it's against the standard to pass a non-const reference to a temporary object. You can use a const reference: class A{}; void bar(const A&); int main(void) { bar(A()); // 2 } So while some compliers will accept it, and it would work as long as don't use the memory after...
I don't think sharing Sprocs among multiple applications makes sense. I can see the case for sharing a database in related applications, but presumably those applications are separate in large part because they treat the data very differently from one another. Using the same architecture could work across appli...
You can implement IXmlSerializable which will allow you to alter the serialized output of your class however you want. This will entail creating the 3 methods GetSchema(), ReadXml(XmlReader r) and WriteXml(XmlWriter r). When you implement the interface, these methods are called instead of .NET trying to serialize the o...
I work for a similar sized company, and when I got here I was in the same place as you. I implemented SVN/Subversion http://subversion.tigris.org/ quite easily. If you use the svn protocol and use svnserve ( can be setup as a windows service that auto starts on your server) it should take you 1.5-3 hours to setup dep...
The short answer: 1) backwards compatibility and 2) there's not enough of a difference for it to really matter. For a more detailed explanation, read on. The idiomatic Python approach to such operations is special methods which aren't intended to be called directly. For example, to make <code>x + y</code> work for...
The drop table will remove the index. Drop Index takes the index name and the table name. In this case would be DROP INDEX idc ON #tbl which can be called if you want to drop the index but leave the table.
Somewhere, you need to tell Apache that people are allowed to see contents of this directory. <Directory "F:/bar/public"> Order Allow,Deny Allow from All # Any other directory-specific stuff </Directory> [More info][1] [1]: http://httpd.apache.org/docs/2.1/mod/core.html#...
I'd SELECT DISTINCT the rows and throw them into a temporary table, then drop the source table and copy back the data from the temp.
I'd SELECT DISTINCT the rows and throw them into a temporary table, then drop the source table and copy back the data from the temp. **EDIT:** now with code snippet! INSERT INTO TABLE_2 SELECT DISTINCT * FROM TABLE_1 GO DELETE FROM TABLE_1 GO INSERT INTO TABLE_1 SELECT * FROM TABL...
In C# the at (@) character is used to denote literals that explicitly do not adhere to the relevant rules in the language spec. Specifically, it can be used for variable names that clash with reserved keywords (e.g. you can't use <tt>params</tt> but you can use <tt>@params</tt> instead, same with out/ref/any other k...
Reading this - I think perhaps you don't realize - that there is no need to edit the XML - in fact it is very difficult to do so. The graphical designer will actually let you change the Work Item type, adding new fields, changing workflow, rules etc. The only reason to change the XML is if there's a bug in the Pro...
Not sure if this relevant, but isn't there a preservespace attribute and whatnot for xml?
Solution 1: Create a unique ID for all the child objects and use that instead of hash code. Solution 2: Replace if (a.GetHashCode() == b.GetHashCode()) with if (a.Equals(b)).
The asterisk. * Its effect: Immediately search for the next instance of the word under the cursor.
Why do you need to determine the which TextBox was pressed? Are you looking to see which TextBox was being focused so that you can trigger the proper button click event? If you are looking to do something like this, one trick I've done was to "group" the appropriate form elements within their own panel and then set ...
Increment a counter every time you render a screen and clear that counter for some time interval over which you want to measure the frame-rate. Ie. Every 3 seconds, get counter/3 and then clear the counter.
Set counter to zero. Each time you draw a frame increment the counter. After each second print the counter. lather, rinse, repeat. If yo want extra credit, keep a running counter and divide by the total number of seconds for a running average.
To find some "best practices", look how Linux distro's (e.g. Debian) write their init-scripts (usually found in /etc/init.d) Most of them are without "bash-isms" and have a good separation of configuration settings, library-files and source formatting. My personal style is to write a master-shellscript which defi...
**.** (dot) - repeats the last editing action. Really handy when you need to perform a few similar edits.
Can you use > ChildVisual = VisualTreeHelper.GetChild(Visual yourVisual) Dunno if you can take a Visual and turn it into a path geometry..
You could keep a counter, increment it after each frame is rendered, then reset the counter when you are on a new second (storing the previous value as the last second's # of frames rendered)
store a start time and increment your framecounter once per loop? every few seconds you could just print framecount/(Now - starttime) and then reinitialize them. edit: oops. double-ninja'ed
I solved this for one site's search by looking at the Request.Form object, server side to see if the search box had a value. I did it in a base class that all my pages (or a base class for the masterpage) inherit from. If it has a value, the odds are pretty good somebody typed something in and hit enter and so I handle...
How to do a "where in values" in LINQ-to-Entities
|linq|
Does anybody know how to apply a "where in values" type condition using LINQ-to-Entities? I've tried the following but it doesn't work: var values = new[] { "String1", "String2" }; // some string values var foo = model.entitySet.Where(e => values.Contains(e.Name)); I believe this works in LINQ-to-SQL though?...
if ('function' === typeof callback) ...
Trying to load files from github through a firewall is impossibly slow. Any suggestions for workarounds?
|git|firewall|github|
I'm a little hesitant to post this, as I'm not completely sure what I'm doing. Any help would be wonderful. I'm on a computer with a firewall/filter on it. I can download files without any difficulty. When I try to clone files from Github, though, the computer just hangs. Nothing happens. It creates a git file in th...
If you could make a Ruby [ANSI][1] (and [xbin][2], and idf, and adf...) Editor, I would love you. Because that means you would have written ANSI parsing routines that I can hope you release to the open source community. ... but that is a selfish answer. Oh, and a cross-platform editor would be nice as well (althou...
Visit [shoooes.net][1] for a UI toolkit that's easy and fun, and then [the-shoebox.org][2] to see the kinds of things people are doing with it. [1]: http://www.shoooes.net [2]: http://www.the-shoebox.org
Can Adobe AIR display SVG?
|adobe|svg|
I see that Adobe AIR uses WebKit as its render and I see that WebKit (at least the most current build) has some SVG support. Does this mean (and has anyone specifically tried) that an Adobe AIR application could render SVG on an HTML page?
In AIML, what's the XSD-valid way to use the element <set name="it"> ?
|aiml|xml|xsd|validation|
In file Atomic.aiml, part of the [annotated ALICE AIML files][1], there are a lot of categories like this: <category> <pattern>ANSWER MY QUESTION</pattern> <template>Please try asking <set name="it">your question</set> another way. </template> </category> This code isn't val...
I work for a similar sized company, and when I got here I was in the same place as you. I implemented SVN/Subversion http://subversion.tigris.org/ quite easily. If you use the svn protocol and use svnserve (can be setup as a windows service that auto starts on your server) it should take you 1.5-3 hours to setup depe...
> I want the HtmlPageNode and CodePageNode classes to inherit either from PageNode or else from RootPageNode. Is that possible? Yeah it's possible. You need to have HtmlPageNode and codePageNode have an object that will be an Abstract class that PageNode will inherit and RootPageNode too. In the constructor of HtmlP...
One big reason to learn Perl or Ruby is to help you automate any complicated tasks that you have to do over and over. Or if you have to analyse contents of log files and you need more mungeing than available using grep, sed, etc. Also using other languages, e.g. Ruby, that don't have much "setup cost" will let yo...
Nuts! A good solution between when I started thinking about this and when I came back to answer. :) I came up with: select (365 + datediff(d,getdate(),cast(cast(datepart(yy,getdate()) as varchar(4)) + '-' + cast(datepart(m,birthdt) as varchar(2)) + '-' + cast(datepart(d,birthdt) as varchar(2)) as datetime))...
Alternative Style(CSS) methods in SAP Portal?
|sap|
I am overriding a lot of SAP's Portal functionality in my current project. I have to create a custom fixed width framework, custom iView trays, custom KM API functionality, and more. With all of these custom parts, I will not be using a lot of the style functionality implemented by SAP's Theme editor. What I would...
I would recommend a separate project for unit tests (and yet more projects for integration tests, functional tests etc.). I have tried mixing code and tests in the same project and found it much less maintainable than separating them into separate projects. Maintaining parallel namespaces and using a sensible naming...
I found the answer at website: http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2900802&SiteID=17 Thanks for your help!
Yes, it's the same I believe... [Here's a video showing it in action][1] [1]: http://www.netbeans.org/kb/docs/java/compile-on-save-screencast.html
Picking up on Biri's answer rather than choose SBS there is a specific Windows Server Web edition which is the cheapest of all, around $399 and doesn't require CALs. Otherwise, if it's just for developer machines Vista Ultimate allows multiple IIS sites hosted simultaneously.
I guess if you are a Java developer and want to have access to all the existing enterprise Java libraries and functionality... go with Grails.
A starting point (which may be non-obvious) for exploring the VC features of Emacs is **M-x vc-next-action**. It does the "next logical version control operation" on the current file, depending on the state of the file and the VC backend. So if the file is not under version control, it registers it, if the file has...
The podcast [Software Engineering Radio][1] has some episodes which talk about e.g. real-time and fault tolerant systems which I found very informative. Those episodes also had good references to books. [1]: http://se-radio.net/