instruction
stringlengths
0
30k
The Express Editions are specifically designed for individuals who do not have access or, more bluntly, cannot afford the full versions of Visual Studio but who would like to develop in the .NET Framework. Team Foundation Server on the other hand, is specifically designed for *corporations* which has software develo...
The Express Editions are specifically designed for individuals who do not have access or, more bluntly, cannot afford the full versions of Visual Studio but who would like to develop in the .NET Framework. Team Foundation Server on the other hand, is specifically designed for *corporations* which has software develo...
You could also theoretically do this as a PixelBender filter, and should get significantly better performance than using a pure ActionScript 3 implementation. More info on PixelBender here: <http://labs.adobe.com/wiki/index.php/Pixel_Bender_Toolkit> mike chambers mesh@adobe.com
There is a problem with inline - once you defined a function in a header file (which implies inline, either explicit or implicit by defining a body of a member function inside class) there is no simple way to change it without forcing your users to recompile (as opposed to relink). Often this causes problems, especiall...
The whitepaper I found most useful was linked from the resource posted by user mbowles above. The direct link is... [http://go.microsoft.com/fwlink/?LinkId=95450&clcid=0x409][1] [1]: http://go.microsoft.com/fwlink/?LinkId=95450&clcid=0x409
A stack overflow is a segmentation fault. As in you've broken the given bounds of memory that the you were initially allocated. The stack of of finite size, and you have exceeded it. You can read more about it at <a href="http://en.wikipedia.org/wiki/Segmentation_fault">wikipedia</a> Additionally, one thing I've don...
If you are using Spring MVC, then I would recommend using Portlets. In Spring, portlets are just lightweight controllers since they are only responsible for a fragment of the whole page, and are very easy to write. If you are using Spring 2.5, then you can enjoy all the benefits of the new annotation support, and they ...
If you are using Spring MVC, then I would recommend using Portlets. In Spring, portlets are just lightweight controllers since they are only responsible for a fragment of the whole page, and are very easy to write. If you are using Spring 2.5, then you can enjoy all the benefits of the new annotation support, and they ...
I'm guessing that you are already doing regular backups of your production database? If you aren't, stop reading this reply and go set it up right now. I'd recommend that you write a script that automatically runs, say once a day, that: 1. Drops your current test database. 2. Restores your current production ...
Personally, I use a single settings.py for the project, I just have it look up the hostname it's on (my development machines have hostnames that start with "gabriel" so I just have this: import socket if socket.gethostname().startswith('gabriel'): LIVEHOST = False else: LIVEHOST = Tr...
This is going to give you a headache unless you define your porblem more clearly to start! Let's assume that str1 is "Amanda and Amy", and str2 is "Amanda and Amylase Amy". Is your function to return "lase Amy" or "Amylase "? Properly defining your problem is the first step towards a solution!
Why can't you just import it as a test file and set the column delimeter to "," and the row delimeter to CRLF?
use the field number, in this case: order by 3
I do except for getters and setters. You have to draw the line somewhere.
You need to duplicate your logic. SQL Server isn't very smart at columns that you've named but aren't part of the dataset in your FROM statement. So use select customerName, customerId, ( select count(*) from Purchases p where p.customerId = c.customerId ...
The same thing could be achieved by using <code>GROUP BY</code> and a <code>JOIN</code>, and you'll be rid of the subquery. This might be faster too.
This might do the trick: [PHP Inline Diff](http://software.zuavra.net/inline-diff/) [Text_Diff](http://pear.php.net/package/Text_Diff)
Do anyone do test cases for pojos?
|unit-testing|
Is that needed?
|java|unit-testing|
I think you can do this in SQL2005, but not SQL2000.
[Swig][1] is a great tool for wrapping C++ classes in other languages like C#. [1]: http://www.swig.org
I'm specifically interested in tools that can be plugged into Vim to allow CScope-style source browsing (1-2 keystroke commands to locate function definitions, callers, global symbols and so on) for languages besides C/C++ such as Java and C# (since Vim and Cscope already integrate very well for browsing C/C++). I'm no...
Further to previous answers its worth noting that: 1. Java allows any Unicode currency symbol in symbol names, so the following will all work: > $var1 > £var2 > €var3 I believe the usage of currency symbols originates in C/C++, where variables added to your code by the compiler conventionally started with '...
[Liquid XML][1] have a nice free version [1]: http://www.liquid-technologies.com/
What are you really looking to accomplish here? A modal dialog sheet is generally going to return control to the host application's event loop when it's done, and any controls on the sheet are going to end up calling actions inside the host app. Are you looking to inject code into the host? Really, it sounds like...
Really, it sounds like you're trying to have your inter-process communication happen at the view level, which isn't really how Cocoa generally works. Things will be much easier if you separate your layers a bit more than that. Why don't you want to put the sheet code into the other process? It's view code, and view ...
I rolled my own. The process is a little convoluted, but... I just made a text_field on the form with an observer. When you start typing into the text field, the observer sends the search string and the controller returns a list of objects (maximum of 10). The objects are then sent to render via a partial which...
You could use something like SetEnvIfNoCase Referer dizzler.com spammer=yes Order allow,deny allow from all deny from env=spammer Source: http://codex.wordpress.org/Combating_Comment_Spam/Denying_Access
First: Speaking pragmatically, it depends what you want to do with the data. In my experience, 99% of all address data is only ever used as a string to be printed on a letter. If that is the case for you, then you should stop worrying and just store it as a string. Of course, if you're doing deeper work with it the...
Mac OS X Terminal: Move cursor word by word
|mac|terminal|
Is there any way in the OS X Terminal to move the cursor word by word? I knwo the combination CTRL+A to jump to the beginning of the current command, and CTRL+E to jump to the end. But is there any way to jump word by word, like ALT+Left/Right in Cocoa applications does? Thanks in advance, Arne
My guess is as follows. The PythonWin editor offers autocomplete for an object, i.e. when you type `myobject.` it offers a little popup of all the availble method names. So I think when you type `X().` it's creating an instance of `X` in the background and doing a `dir` or similar to find out the attributes of the ob...
I'm not sure what are JSFL capabilities these days, but I'd say inside Flash IDE is your only bet. JSFL is a language to extend the Flash IDE, but I'm not sure you can do this. On a related note, adding SVN information to your SWFs is not trivial. You'd probably need SVN hooks to put the information *before* actuall...
Your question implies that you don't need Unicode. Try the following code snippet; if it works for you, you're done: Python 2.5.2 (r252:60911, Aug 22 2008, 02:34:17) [GCC 4.3.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.setlo...
You'll want to look at std::map std::map<keyType, valueType> The map is sorted based on the < operator provided for keyType. Or std::set<valueType> Also sorted on the < operator of the template argument I highly reccomend "The C++ Standard Library" by Josuttis for more information. It is the ...
You'll want to look at std::map std::map<keyType, valueType> The map is sorted based on the < operator provided for keyType. Or std::set<valueType> Also sorted on the < operator of the template argument, but does not allow duplicate elements. There's std::multiset<valueType> which d...
The only way to make it transparent to your users is to put it behind a load balanced proxy. You take one server down while you update another server. Then when you done updating you put the one you updated online and take the other one down. That's how we do it. If you have any sort of 'beta" build, don't roll it o...
It's not that simple. In my experience insert/delete is used less often than find. Advantage of sorted vector is that it takes less memory and is more cache-friendly. If happen to have version that is compatible with STL maps (like the one I linked before) it's easy to switch back and forth and use optimal container fo...
Is there an Eclipse command to surround the current selection with parentheses?
|eclipse|keyboard-shortcuts|
Is there an Eclipse command to surround the current selection with parentheses?
Is there an Eclipse command to surround the current selection with parentheses? Creating a template is a decent workaround; it doesn't work with the "Surround With" functionality, because I want to parenthesize an expression, not an entire line, and that requires `${word_selection}` rather than `${line_selection}`. ...
How to backup a VPS server? And restore it in an emergency too?
|backup|
I have a VPS host running 3 sites using Ubuntu Hardy. I've spent much time setting it up. That includes all the installation + configuration and stuff. What ways are there to do backup + restore for VPS?
|backup|
It depends on the situation. If the menu item has applies in the current context but isn't available because of state, it should be disabled. If the context has changed so it no longer applies, it should be removed.
I think you are missing one very important option in your list: choose the right programming language for the job. There are many programming languages which do not have these problems, because they don't have fixed size integers.
I haven't verified this but it seems that setting the `$HTTPS_CA_FILE` environment variable to point to your ca-bundle.crt should do the trick. (the <a href="http://search.cpan.org/perldoc?Crypt::SSLeay">Crypt::SSLeay docs</a> mentions this but is a bit light on details)
Setting the `$HTTPS_CA_FILE` environment variable to point to your ca-bundle.crt should do the trick. (the <a href="http://search.cpan.org/perldoc?Crypt::SSLeay">Crypt::SSLeay docs</a> mentions this but is a bit light on details). Example (assuming you have Crypt::SSLeay and LWP::Simple installed): <pre> <code> ...
There are two means of doing this depending on which SSL module you have installed. The <a href="http://search.cpan.org/src/GAAS/libwww-perl-5.814/README.SSL">LWP docs recommend installing Crypt::SSLeay</a>. If that's what you've done, setting the `HTTPS_CA_FILE` environment variable to point to your ca-bundle.crt sh...
Division and modulus are your friends.
Division and modulus are your friends. #include "stdio.h" int main(){ int digits[] = {0,0,0,0,0,0,0,0,0,0}; int i = 11031; while(i > 0){ digits[i % 10]++; i = i / 10; } printf("There are %d ones.\n", digits[1]); }
You could try [gSOAP](http://www.cs.fsu.edu/~engelen/soap.html). Available under GPL and commercial licences.
I always found it clear, concise, and problem free using a version of the If/Else check, only with the ternary operator. Keeps everything on one row, including assigning a default value if the column is null. So, assuming a nullable Int32 column named "MyCol", where we want to return -99 if the column is null, but r...
When setting your break point, right click and you should get several options about how the break point is handled (log vars and continue, pause execution, etc) Also make sure the "Load Symbols lazily" is not selected in the debug preferences. (Applies to Xcode 3.1, not sure about past/future versions)
Or even better, use HTML elements that fit your need. It's cleaner, and produces leaner markup. Example: <dl> <dt>Lorem Ipsum etc <em>here</em></dt> <dd>blah</dd> <dd>blah blah</dd> <dd>blah</dd> <dt>lorem ipsums <em>and here</em></dt> </dl> Float the `em` to the...
SQL Express has larger database capacity than the previous MSDE product (4Gb vs 2Gb), so it's great as Slavo said for testing and small apps. SQL Server 2005 is updated via Microsoft Update, which is good or bad depending on your point of view.
The Design of Everyday Things - Donald Norman A canon of design lore and the basis of many HCI courses at universities around the world. You won't design a great GUI in five minutes with a few comments from a web forum, but some principles will get your thinking pointed the right way. -- MC
Some differences: - CLR (.NET) stored procedures - SSIS instead of DTS - Management Studio instead of Enterprise Manager, with more functions (2008 version is even better) - VS integration - better replication - SMO and AMO (extensions to handle the server from applications) - table and index par...
Generally yes. Nothing should go wrong, and assuredly if it did, yahoo would be on the problem in no time!
Sometimes you have to wrestle with SQL's syntax (expected scope of clauses) SELECT * FROM ( select customerName, customerId, ( select count(*) from Purchases where Purchases.customerId=customerData.customerId ) as numberTransactions from ...
Of course, if they contain "mission critical" code, you'll want to test them.
It may not be worth it to add all of the data from a jpeg file (exif data). I would hand pick what attributes I wanted from those files.
Porting is very platform specific, so I don't think you will find much general literature on the subject. Off the top of my mind, some things you may encounter: * endianness * word size * available libraries * compiler differences * linker differences (you've already seen that one) * peripheral hardwar...
Which just goes to show, if you don't know how to do proper code profiling, don't be doing this stuff. The speed difference of these two methods are within the same Big O() speed (As proven by @Leon Timmermans opcode analyisis) - the benchmarks are just going to show differences based on other local conditions, not ne...
The load shouldn't be put on the webserver, you should put it on the firewall.
wow, 4 hours and no answer; i had a similar experience in school but just learned the stuff and figured out what it was good for later. it turns out to be very useful, so let's see if this helps - a database is formally defined as a set of relations, but it is also a graph; each table is a node, each column is a nod...
The first book that made a real impact on me was *[Mastering Turbo Assembler][1]* by Tom Swan. Other books that have had an impact was *[Just For Fun][3]* by Linus Torvalds and David Diamond and of course *[The Pragmatic Programmer][2]* by Andrew Hunt and David Thomas. [1]: http://www.amazon.com/Mastering-Tur...
Sounds like [Apache Ant][1] is what you're looking for. [1]: http://ant.apache.org/
Real-time is getting a required response to an event completed within the time period specified or *your system fails*. People are used to thinking this must mean 'small number of milliseconds/microseconds' but that isn't necessarily true - it depends on your system. If your system will *fail* if it doesn't compl...
How can I listen to a RoutedEvent from a class that doesn't derive from FrameworkElement ? Can it be done ?
|wpf|
The question says it all basically. I want in a class MyClass to listen to a routed event. Can it be done ?
There is a tool called [autojar][1] which will scan your bytecode and compile a .jar file with the classes it finds, including referenced (imported) classes. Doesn't always work with something like Spring, though, where you specify the classnames in configuration and it gets loaded by the framework. [1]: http...
ASP.NET : How to detect file upload Mime type?
|mime|types|
How do people usually detect mime type once file uploaded using asp.net?
I can't guarantee this, but try undeploying, then renaming the ROOT folder and then deploying again.
One problem with l.books.map{|b| b.libraries}.flatten.uniq is that it will generate one SQL call for each book in l. A better approach (assuming I understand your schema) might be: LibraryBook.find(:all, :conditions => ['book_id IN (?)', l.book_ids]).map(&:library_id).uniq
Pattern for saving and writing to different file formats
|design-patterns|file-io|
Is there a pattern that is good to use when saving and loading different file formats? For example, I have a complicated class hierarchy for the document, but I want to support a few different file formats. I thought about the Strategy pattern, but I'm not convinced because of the need to access every part of the...
This can create endless discussion, but there is one tenet I would hold to whenever deciding what license to use: **DON'T CREATE A NEW ONE!!** No matter how persuasive your legal guy's arguments that, because no current license exactly meets your project's unique needs, you should write your own, or even just "sli...
Have you considered matching the actual possible keywords? such as: (?:(?:public)|(?:private)|(?:static)|(?:protected)\s+)* It might be a bit more likely to match correctly, though it might also make the regex harder to read...
The difficulty with scrolling is that you may not only need to scroll the page to show a div, but you may need to scroll inside scrollable divs on any number of levels as well. The scrollTop property is a available on any DOM element, including the document body. By setting it, you can control how far down something...
As far as I can tell from the QTKit Documentation there is not way to do this in straight QTKit cocoa calls. You'll need to [do this using the Quicktime-C APIs][1], which of course aren't available to 64-bit applications. I've run into issues like this numerous times when trying to convert a 32-bit app that uses Qu...
CSS text-align property should be declared on the parent element and not the element you are trying to center. IE uses text-align: center property to center text. Firefox uses margin: 0 auto and it has to be declared on the element you are trying to center. <div style="text-align"> <h2 style="margin: 0 ...
I think that you should ask some questions to know why refactoring could hurts source control. - Why are 10 people changing the same code at the same time? - There are better tools to help you when doing refactoring/merges (maybe [distributed version control][1])? For the first question, maybe you haven't goo...
Why do fixed elements slow down scrolling in Firefox?
|css|firefox|css-position|
My question is simple, why do elements with the CSS "position: fixed" applied to them cause Firefox to eat 100% CPU when scrolling the page they are in? And are there any workarounds? I've noticed this behaviour on a few sites, for example the notification bar at the top of the page on stackoverflow. I'm using Linux...
How do you update a live, busy web site in the politest way possible?
|testing|
When you roll out changes to a live web site, how do you go about checking that the *live* system is working correctly? Which tools do you use? Who does it? Do you block access to the site for the testing period? What amount of downtime is acceptable?
|high-availability|
From MSDN: > <strong>Form.Load</strong> > Occurs before a form is displayed for the first time. Meaning the only thing that would cause the form to load, is when it is displayed. `Form.Show();` and `Form.Visible = true;` are the exact same thing. Basically, behind the scenes, Show checks for various condit...