instruction
stringlengths
0
30k
I have a 1920x1200 screen an would like to customize VS2008 code windows to have some areas split vertically and horizontally (tab groups). I can only seem to do all vertical or all horizontal in VS2008. Is there any crafty way of getting a mixing both?
This is not purely .NET related but it is in the vein of the using Spaces item in the question. Trackpad tips for Leopard (may not be supported in earlier OS X versions): - Set System Preferences, Keyboard & Mouse, Trackpad to use Two Finger Secondary Click. This allows you to use two finger taps instead of the...
This is not purely .NET related but it is in the vein of the using Spaces item in the question. Trackpad tips for a MacBook running Leopard (may not be supported in earlier OS X versions): - Set System Preferences, Keyboard & Mouse, Trackpad to use Two Finger Secondary Click. This allows you to use two finger t...
Assuming you already have a Coordinate class, add a hash function and maintain a hash_set of the coordinates. Would look something like: struct coord_eq { bool operator()(const Coordinate &s1, const Coordinate &s2) const { return s1 == s2; // or: return s1.x() == s2.x() && s...
Divide your space into discrete bins. Could be infinitely deep squares, or could be cubes. Store your processed coordinates in a simple linked list, sorted if you like in each bin. When you get a new coordinate, jump to the enclosing bin, and walk the list looking for the new point. Be wary of floating point comp...
@Chuck - a good idea. If the test was created in Flash/Flex, you could force the user to make the application fullscreen in order to start the test (fullscreen mode has to be user-initiated). Then, you can listen for the Flash events dispatched when flash exits fullscreen mode and take whatever appropriate action y...
Rather than filling in the excel spreadsheet programmatically, you may want to use the external data features of Excel and Access. Generally I put a query on each tab, which of course may be hidden. An "update all" causes all the queries to be updated. Then summary tabs show the pretty results from all the individual ...
Detect: Debug CRT Avoid: Smart pointers, boehm GC
Joel Coehoorn's answer is of course correct, that if the data is critical or there are naive users using the data, then a application front end should be developed. That being said, I have cases where a wise user (ok, me) user needs to just get in there and poke around. Instead of directly looking at the tables, ...
I am not entirely sure what you mean by "included in an application", as you could potentially deliver any library so long as the licensing allows. Are you referring to the fact that sqlite is small or that it is [public domain][1]? [Mercurial][2] is a similarly lightweight piece of revision control software. If y...
Anybody know what my DLLImport statement should look like here: extern "C" __declspec(dllexport) long SomeFunction(VARIANT *argNames, VARIANT *argValues, VARIANT *pVal) { ... }
**Learning C# 2005**, by Jesse Liberty & Brian MacDonald (O'Reilly). ISBN 10: 0-596-10209-7. When I first made the jump from ASP classic procedural code to object-oriented C# code in VS2005, this book set me on the right path.
I'm not familiar with that application block, but assuming that MethodBase property is of type System.Reflection.MethodBase, you could take a look at the IsSpecialName property. [System.Reflection.MethodBase.IsSpecialName on MSDN][1] [1]: http://msdn.microsoft.com/en-us/library/system.reflection.methodbase.is...
Perl doesn't have a console but the debugger can be used as one. At a command prompt, type `perl -de 1`. (The value "1" doesn't matter, it's just a valid statement that does nothing.) There are also a couple of options for a [Perl shell](http://perldoc.perl.org/perlfaq3.html#Is-there-a-Perl-shell%3f). For more in...
The problem comes when you read that state back, and do something about it. Writing is a red herring - it is true that as long as this is a single word most environments guarantee the write will be atomic, but that doesn't mean that a larger piece of code that includes this fragment is thread-safe. Firstly, presumably ...
The problem comes when you read that state back, and do something about it. Writing is a red herring - it is true that as long as this is a single word most environments guarantee the write will be atomic, but that doesn't mean that a larger piece of code that includes this fragment is thread-safe. Firstly, presumably ...
It's not obvious until you've tried it =) I struggled with the same thing just a few weeks ago. This was my solution: The list: <List> <mouseDown>onListMouseDown(event)</mouseDown> </Tree> The mouse down handler: private function onMouseDown( event : MouseEvent ) : void { var list...
One thing that I found really confusing in modern vi (vim?) is the input mode that allows for some, but not all features of command mode. I feel much more comfortable when input mode is fully dumbed down to "overwrite only, no cursor movement possible" kind of thing that old Solaris vi has. The true vi requires you to ...
Doesn't Eclipse have a predefined keyboard setup for Visual Studio?
Install `gVim` on all platforms you use. Then run through the the vimtutor (`:help vimtutor` or `vimtutor` at the command line). Watch the following lecture and follow its advice: [7 Habits For Effective Text Editing 2.0][1] [1]: http://video.google.com/videoplay?docid=2538831956647446078 I say you defi...
Embed asp page without iframe
|asp.net|iframe|
I want to embed an .asp page on an html page. I cannot use an iframe. I tried: <object width="100%" height="1500" type="text/html" data="url.asp"> alt : <a href="url.asp">url</a> </object>" works great in ff but not ie7. Any ideas?
I want to embed an .asp page on an html page. I cannot use an iframe. I tried: <object width="100%" height="1500" type="text/html" data="url.asp"> alt : <a href="url.asp">url</a> </object>" works great in ff but not ie7. Any ideas? Is it possible to use the object tag to embed .asp pages for IE o...
Perhaps I am under-thinking the problem but I'll throw this out there... You could just put your form inside a hidden div or similar container that you show (perhaps give it a modal look/behavior?) on the click event of the link. That way the form is already loaded as part of the page. It should appear almost instantly...
The answer for the "obedient" is "because the Standard says the behavior of a program not ending in newline is undefined" (paraphrased). The answer for the curious is here: http://gcc.gnu.org/ml/gcc/2001-07/msg01120.html.
Speech Recognition for Searching Files
|speech-recognition|
Here is the problem I have: I have a lot (tens of thousands) of mp3 files that my users would like to be able to search. Is there is software out there that you've used or heard good things about that would allow me to index that content and put it in a database so I can search on it later?
Sure you can, but it's tricky and you should really consider if that's the way you want to go. The idea is to use scope-based inheritance coupled with type-based one. Which is type-talk for saying that for internal purposes, inner classes "inherit" methods and fields of the outer class. It's a bit like mixins, where...
Sure you can, but it's tricky and you should really consider if that's the way you want to go. The idea is to use scope-based inheritance coupled with type-based one. Which is type-talk for saying that for internal purposes, inner classes "inherit" methods and fields of the outer class. It's a bit like mixins, where...
The command is: show triggers or you can access the `INFORMATION_SCHEMA` table directly by: select trigger_schema, trigger_name, action_statement from information_schema.triggers - You can do this from version 5.0.10 onwards. - More information about the [`TRIGGERS` table is here][1]. ...
Sounds to me like you shouldn't use Flex at all. Flex is great for writing applications that load and display data, but is a huge overhead if you just want to display charts. If you're worried about delivering the SWF and the data in two separate responses, you should be worrying about the 200-300 K overhead of the Fle...
In my opinion [Firebird][1] is one of the best choices for embedded DB scenarios. Also [Microsoft SQL Server Compact][2] might be suitable, however it less capable than Firebird. [1]: http://www.firebirdsql.org/ [2]: http://www.microsoft.com/sql/editions/compact/default.mspx
In my opinion [Firebird][1] is one of the best choices for embedded DB scenarios. Also [Microsoft SQL Server Compact][2] (closed source, but free) might be suitable, however it less capable than Firebird. If you don't want to use RDBMS, you can try to embed [SVN][3] to your application. [1]: http://www.fir...
In my opinion [Firebird][1] is one of the best choices for embedded DB scenarios. Also [Microsoft SQL Server Compact][2] (closed source, but free) might be suitable, however it less capable than Firebird. **EDIT:** I misread you question. If you don't need RDBMS, you can try to embed [SVN][3] to your application...
SQL Compare-Like tool for Oracle?
|oracle-database|sqlcompare|
We're a .NET team which uses the Oracle DB for a lot of reasons that I won't get into. But deployment has been a bitch. We are manually keeping track of all the changes to the schema in each version, by keeping a record of all the scripts that we run during development. Now, if a developer forgets to check-in his s...
How do you list all triggers in a MySQL database?
|mysql|
What is the MySQL command to list all triggers in a MySQL database?
|.net|vb.net|printing|header|printdocument|
Developing drivers with no info
|driver|kernel|linux|bsd|
How does the open-source/free software community develop drivers for products that offer no documentation?
|linux|kernel|drivers|bsd|
What is the best way to keep an asp:button from displaying it's URL on the status bar?
|asp.net|
What is the best way to keep an asp:button from displaying it's URL on the status bar of the browser? The button is currently defines like this: <asp:button id="btnFind" runat="server" Text="Find Info" onclick="btnFind_Click"> </asp:button>
What is the best way to keep an asp:button from displaying it's URL on the status bar of the browser? The button is currently defines like this: <asp:button id="btnFind" runat="server" Text="Find Info" onclick="btnFind_Click"> </asp:button> **Update:...
As Prestaul pointed out, the alt tag should work for images and title for links. However, this is also browser dependent...most browsers **should** implement functionality that displays this metadata as tooltips but they aren't required to do so.
There's nothing special about .compiled files: it's just the actual file with a .compiled extension on the end so that nothing happens if you accidentally double click it. But if you're seeing .compiled files, you're publishing your app in such a way that it expects to be formally installed- it's not enough to jus...
Hmm all that functionality on the loose! careful you don't lose it (sorry!) Are you using something like [Firebug][1] (firefox plug-in) so you can see what ajax calls the page is trying to make? If it is making the call but the server is behaving oddly then you will see the error there too. IE users maybe able to us...
The alt property of an img tag works in some browsers, but not all (such as some mozilla-based ones). The "[right way][1]" to do this is to use the title property. [1]: http://www.mozilla.org/docs/web-developer/faq.html#alttooltip
I'd imagine its one of: - Eclipse doesn't want to display non-C++ resources in the tree (I've had problems with this) - You don't have "Preferences > C/C++ > Indexer > Index All Files" enabled. - You want to use the "Full C/C++ Indexer" rather than the "Fast C/C++ Indexer"
How to iterate through all the cells in Excel VBA or VSTO 2005
|excel|vba|vsto|
I need to simply go through all the cells in a Excel Spreadsheet and check the values in the cells. The cells may contain text, numbers or be blank. I am not very familiar / comfortable working with the concept of 'Range'. Therefore, any sample codes would be greatly appreciated. (I did try to google it, but the co...
A variant is an object. [http://msdn.microsoft.com/en-us/library/aa719104(VS.71).aspx][1] [1]: http://msdn.microsoft.com/en-us/library/aa719104(VS.71).aspx
it's the special table in Oracle. I often use it for calculation or checking system variable. For example; - "Select 2*4 from dual" prints out the result of the calculation - "Select sysdate from dual" prints the server current date.
One way would be to periodically recycle your storage media, i.e. read data off the decaying medium and write it to a fresh one. There exist programs to assist you with this, e.g. [dvdisaster][1]. In the end, nothing lasts forever. Just pick the least annoying solution. As for #2: you can store data in encrypted for...
I think Option 2 works well enough if you have the write backup mechanisms in place. They need not be expensive ones involving a third-party, either (except for disaster recovery). A RAID 5 configured server would do the trick. If a hard drive fails, replace it. It is HIGHLY unlikely that all the hard drives will fail...
It is a dummy table with one element in it. It is useful because Oracle doesn't allow statements like SELECT 3+4 You can work around this restriction by writing SELECT 3+4 FROM DUAL instead.
It's a object to put in the from that return 1 empty row. For example: select 1 from dual; returns 1 select 21+44 from dual; returns 65 select [sequence].nextval from dual; returns the next value from the sequence.
The Application.OnException event handler can be assigned to catch all exceptions that aren't handled by other exception handlers. Whilst this is run-time, and thus perhaps not exactly what you are after (it sounds like you want to identify them at design time), it does allow you to trap any exception not handled elsew...
(Edit: It is now obvious that the question referred *only* to design-time checking.) New answer: I cannot state whether there are any tools to check this for you. Pascal Analyzer, for one, does not. I *can* tell you, however, that in most Delphi applications, even if there was a tool to check this for you, you...
Given a Date Object how do I determine the last day of its month?
|java|date|
I'm trying to use the following code but it's returning the wrong day of month. Calendar cal = Calendar.getInstance(); cal.setTime(sampleDay.getTime()); cal.set(Calendar.MONTH, sampleDay.get(Calendar.MONTH)+1); cal.set(Calendar.DAY_OF_MONTH, 0); return cal.getTime();
You can easily define a comparator for a one-level `std::map`, so that lookup becomes way less cumbersome. There is no reason of being afraid of that. The comparator defines an ordering of the _Key template argument of the map. It can then also be used for the multimap and set collections. An example: ...
Perhaps type.IsAssignableFrom(obj.GetType())
Take a look at [Rational App Scan][1] (used to be called Watchfire). Its not free, but has a nice UI, is dead powerful, generates reports (bespoke and against standard compliance frameworks such as Basel2) and I believe you can script it into your CI build. [1]: http://www-01.ibm.com/software/awdtools/appscan/
blindly going in an terminating connections is not the way to solve this problem. first you need to understand why you are running out of connections. is your max_connections setting selected to correctly match the number of max/anticipated users? are you using persistent connections when you really don't need them? et...
We once had a bug which eluded all of the regular techniques, valgrind, purify etc. The crash only ever happened on machines with lots of memory and only on large input data sets. Eventually we tracked it down using debugger watch points. I'll try to describe the procedure here: 1) Find the cause of the fai...
I believe(I've never tried this) you can can compile Linux binarys against winelib. So it works just like a Linux executable, but with the windows libraries. http://www.winehq.org/site/docs/winelib-guide/index
Check out this msdn reference article on [Has_Perms_By_Name][1]. I think you're really interested in examples D, F and G ---------- Another idea... I fired up SQL profiler and clicked on the ObjectExplorer->Security->Users. This resulted in (approx) the following query being issued. SELECT * FRO...
Because VB and .NET will use different SQL connections (and there is no way to make ADO and ADO.NET share the same connection), your only possibility is to enlist the DTC (Distributed Transaction Coordinator). The DTC will coordinates the two independent transactions so they commit or are rolled-back together. **Fro...
You may want to consider a small transparent window that you move to follow the mouse. In particular, since Windows 2000, [Layered](http://msdn.microsoft.com/en-us/library/ms632599\(VS.85\).aspx#layered) windows seem to be the weapon of choice (confession: no personal experience there).
Should rails models be concerned with other models for the sake of skinny controllers?
|ruby|ruby-on-rails|best-practice|
What is the command to list all triggers in a MySQL database?
What is the best technique for consistent form, function between all web browsers (including Google Chrome)?
|css|google-chrome|portability|
Short version: What is the cleanest and most maintainable technique for consistant presentation and AJAX function across all browsers used by both web developers and web developers' end-users? - IE 6, 7, 8 - Firefox 2, 3 - Safari - Google Chrome - Opera Long version: I wrote a [web app aimed at other web...
|css|google-chrome|portability|
If the chart is just a graphic you are placing amidst normal html content, your solution of custom compiling the swf may be a good one. Of course you should still explore alternatives like Theo's suggestion. If your whole application is flash, it's a toss-up. If it is fastest to simply import a swf, go ahead. How...
Is [Firebug][1] not sufficient? [1]: https://addons.mozilla.org/en-US/firefox/addon/1843
[@Swaroop C H][1], SVN doesn't require any prerequisites on end user machine. You can embed SVN right into you app. [1]: http://stackoverflow.com/questions/47340/versioning-library-like-sqlite-database-library#47367
[@Swaroop C H][1], SVN doesn't require any prerequisites on end user machine. You can embed SVN right into you app. To learn more on subversion integration, visit "[Application Integration/Embedding][2]" thread on SVN forum. [1]: http://stackoverflow.com/questions/47340/versioning-library-like-sqlite-database...
I want to embed an .asp page on an html page. I cannot use an iframe. I tried: <object width="100%" height="1500" type="text/html" data="url.asp"> alt : <a href="url.asp">url</a> </object>" works great in ff but not ie7. Any ideas? Is it possible to use the object tag to embed .asp pages for IE o...
You may find these questions useful - [Where do you store your code snippets?][1] - [Tracking useful information][2] - [What is you preferred site for code snippets?][3] [1]: http://stackoverflow.com/questions/4101/where-do-you-store-your-code-snippets#4137 [2]: http://stackoverflow.com/questions/1777...
[white paper on SQL Server 2008][1] This should cover most of the new features. I noticed the new date time data types and new security features. [1]: http://download.microsoft.com/download/6/9/d/69d1fea7-5b42-437a-b3ba-a4ad13e34ef6/SQL2008_ProductOverview.docx
I disagree with your premise. When used carefully and properly, C++ is a great language, especially for a domain like real-time graphics, where speed is of the essence. Memory management becomes easy if you design your system well, and use stl containers and smart pointers. <code>std::vector<Thingy>::const_itera...
In my experiecne, googling it works faster than msdn search.
Hierarchical Group Permissions Theory/Resources?
|theory|permissions|groups|user|
Does anyone know of some good resources related to setting up heirarchical user account systems? I'm currently setting one up and am struggling with some of the more complex logic (especially with determining permissions). I was hoping I might be able to find some resources to help me along. I'm building a user acco...
|theory|permissions|user|groups|
Does anyone know of some good resources related to setting up heirarchical user account systems? I'm currently setting one up and am struggling with some of the more complex logic (especially with determining permissions). I was hoping I might be able to find some resources to help me along. **Some Background:**...