instruction
stringlengths
0
30k
|language-agnostic|language|glossary|language-binding|
My way: 'Ctrl-V' to start blockwise visual mode. Make your selection. With the selection still active, 'Shift-I'. This put you into column insert mode. Type you comment characters '#' or '//' or whatever. ESC.
My block comment technique: 'Ctrl-V' to start blockwise visual mode. Make your selection. With the selection still active, 'Shift-I'. This put you into column insert mode. Type you comment characters '#' or '//' or whatever. ESC.
I'd say yes. To me, it just breaks the 'flow' of a fluidly-written piece of code. Another argument could also be that if you stick to the basic keywords supported by most modern languages, then your program flow (if not the logic or code) could be ported to any other language. Having an unsupported keyword (ie, cont...
I am using Oracle 9.2.0.8.0. and it does give the error "ORA-00918: column ambiguously defined".
ASP.NET how to Render a control to HTML?
|.net|asp.net|
I have any ASP.NET control. I want the HTML string how to do I get the HTML string of the control?
There is a good chance you will not be able to get away with configuration alone. I had to do some integration work with Axxis (our end was WSE3 -- WCF's ancestor), and I had to write some code and stick it into WSE3's pipeline to massage the response from Axxis before passing it over to WSE3. The good news is that add...
This might not be the ideal solution for you but might still be worth mentioning. *[Snapsie][1] is an open source, ActiveX object that enables Internet Explorer screenshots to be captured and saved.* Once the dll is registered on the client, you should be able to capture the screenshot and upload the file to the server...
If you're using Java 6, try jvisualvm from the JDK bin directory.
I couldn't see this looking above - one this I didn't realise you could do until recently is call one constructor from another: class Example { public Example(int value1) : this(value2, "Default Value") { } public Example(int value1, string value2) ...
The Java-based editor "jEdit", is a good example of text editor architecture, complete with plugin support, a strong user community, and good abstractions.
There's a plugin for Eclipse called FDT. It uses the open source compiler MTASC and supports ANT. The tool is free for OpenSource developers. Get more Infos here: http://fdt.powerflasher.com/ Hope it helps :)
AFAIK, all of the distros package V 4.+ nowadays.
There's a DefaultValueAttribute that can be assigned to a property, this is mainly used by the designer tools so they can indicate when a property has been changed, but, it might be a "tidy" way of describing what the default value for a property is, and thus being able to identify if it's changed. You'd need to use...
Is it safe for structs to implement interfaces?
|.net|interface|struct|
I seem to remember reading something about how it is bad for structs to implement interfaces in CLR via C#, but I can't seem to find anything about it. Is it bad? Are there unintended consequences of doing so? public interface Foo { Bar GetBar(); } public struct Fubar : Foo { public Bar GetBar() { return ...
One more aspect of the problem which was not mentioned is that the generated code should also be "version control-friendly" (as far as it is feasible). I found it useful many times to double-check diffs in generated code vs the source code. That way you could even occasionally find bugs in tools which generate ...
If the subquery route was too slow I would look at treating your price updates as an audit log and maintaining a ThingPrice table - perhaps as a trigger on the price updates table: ThingID int not null, UpdateID int not null, PriceDateTime datetime not null, Price decimal(18,4) not null The pri...
Animation Extender Problems
|c#|animationextender|
I have just started working with the AnimationExtender. I am using it to show a new div with a list gathered from a database when a button is pressed. The problem is the button needs to do a postback to get this list as I don't want to make the call to the database unless it's needed. The postback however stops the ...
In our application, we give the user the option to connect to another server, e.g., if the database connection fails, a dialog box displays saying that the server is unavailable, and they could input another IP address to try.
How to get controls in WPF to fill available space?
|user-interface|wpf|
Didn't get a reply to this on the MSDN WPF forum, so I thought I'd try here. Some WPF controls - like the button - seem to happily consume all the availible space in its' container if you don't specify the height it is to have. And some - like the ones I need to use right now, the (multiline) TextBox and the List...
I have an asp.net url path which is being generated in a web form, and is coming out something like "/foo/bar/../bar/path.aspx", and is coming out in the generated html like this too. It should be shortened to "/foo/bar/path.aspx". Path.Combine didn't fix it. Is there a function to clean this path up?
|c#|asp.net|asp|path|
How can I measure the similarity between two images?
|language-agnostic|algorithm|image|
I would like to compare a screenshot of one application (could be a Web page) with a previously taken screenshot to determine whether the application is displaying itself correctly. I don't want an exact match comparison, because the aspect could be slightly different (in the case of a Web app, depending on the browser...
|language-agnostic|algorithm|image|
|language-agnostic|algorithm|image|
Anyone have experience creating a shared library in MATLAB?
|python|c|matlab|
A researcher has created a small simulation in MATLAB, and we want to make it accessible to others. My plan is to take the simulation, clean up a few things, and turn it into a set of functions. Then, I plan to compile it into a C library and use SWIG to create a Python wrapper. At that point, I should be able to call ...
|python|c|matlab|
Good STL-like library for C.
|c|
What are good libraries for C with datastructures like vectors, deques, stacks, hashmaps, treemaps, sets, etc.? Plain C, please, and platform-independent.
|c|architecture|data-structures|
|c|architecture|data-structures|
|c|architecture|data-structures|
|c|architecture|data-structures|
Are there C library resources similar to C++'s Boost library?
|c|
I don't ever recall coming across anything for C that's as extensive as C++'s Boost library.
|c|
C/C++ library for reading MIDI signals from a USB MIDI device
|sql|sql-server|database|
|sql|sql-server|database|t-sql|
|sql|
I have a History Table in SQL Server that basically tracks an item through a process. The item has some fixed fields that don't change throughout the process, but has a few other fields including status and Id which increment as the steps of the process increase. Basically I want to retrieve the last step for each i...
|sql|sql-server|database|t-sql|
|sql-server|database|sql|t-sql|
|sql-server|database|sql|t-sql|
|sql-server|database|sql|t-sql|
I have a History Table in SQL Server that basically tracks an item through a process. The item has some fixed fields that don't change throughout the process, but has a few other fields including status and Id which increment as the steps of the process increase. Basically I want to retrieve the last step for each i...
I have a History Table in SQL Server that basically tracks an item through a process. The item has some fixed fields that don't change throughout the process, but has a few other fields including status and Id which increment as the steps of the process increase. Basically I want to retrieve the last step for each i...
From the FAQ: [What are some limits in memcached I might hit?][1] [1]: http://www.eu.socialtext.net/memcached/index.cgi?faq#what_are_some_limits_in_memcached_i_might_hit
@tweakt > It's no better, but what I've done in the past: > > boolean ok = cond1; > ok &= cond2; > ok &= cond3; > ok &= cond4; > ok &= cond5; > ok &= cond6; > >Which is the same as: > > ok = (cond1 && cond2 && cond3 && cond4 && cond5 && cond6); Actually, these two things are not the ...
This will capture the URLs from all a tags as long as the author of the HTML used quotes: <a[^>]+href="([^"]+)"[^>]*>
This will capture the URLs from all a tags as long as the author of the HTML used quotes: <a[^>]+href="([^"]+)"[^>]*> I made an example <a href="http://www.rubular.com/regexes/840">here</a>.
You want to be able to distribute the DLL with all of the setup information being in a configurable place, but the fact is you can't have one of the handy-dandy .NET config files for a DLL unless you do something custom. Maybe you need to rethink what responsibility your DLL should have. Would it be possible, or mak...
In many simple cases, you can use the MethodInvoker delegate and avoid the need to create your own delegate type.
Ok, so my final solution is this: Use the export command to export to a folder called "export" in the same directory as a file called "deploy.bat", then I run the deploy script (v1 stands for version 1, which is what version I am currently on in this project) This script utilizes 7-Zip, which I have placed on my sys...
|wpf|user-interface|
Didn't get a reply to this on the MSDN WPF forum, so I thought I'd try here. Some WPF controls - like the button - seem to happily consume all the availible space in its' container if you don't specify the height it is to have. And some - like the ones I need to use right now, the (multiline) TextBox and the List...
Calling an event `bind` method (such as `hover`) does not delete old event handlers, only adds your new events, so your idea of 'restoring' the old event functions wouldn't work, as it wouldn't delete your events. You can add your own events, and then remove them without affecting any other events then use Event nam...
You will need to create an entire new host if you are currently using IIS as your host - IIS only supports HTTP and not TCP bindings. If however you are using WAS or a windows service, then you'll be able to get away with simply creating a new net.tcp endpoint.
Boost is probably the best choice, however if you're wanting something that's more standalone, and if this is for use with Windows (which seems feasible given that they are the people least likely to have Python installed), then you can use [py2exe][1] to create a DLL with entry points suitable for COM objects. You ca...
I'll pick some points of your very broad question and answer them. Note that there are other points where others may be of more help... First, a GSM modem is probably not the way you'd want to go as they usually don't allow for concurrency. So unless you just want one user at the time to use your service, you'd prob...
Like HollyStyles, I cannot find anything in the Oracle docs which can explain what you are seeing. PostgreSQL, DB2, MySQL and MSSQL all refuse to run the first query, as it's ambiguous.
This appears to work. public string RenderControlToHtml(Control ControlToRender) { System.Text.StringBuilder sb = new System.Text.StringBuilder(); System.IO.StringWriter stWriter = new System.IO.StringWriter(sb); System.Web.UI.HtmlTextWriter htmlWriter = new System.Web.UI.HtmlText...
Is there a keyboard shortcut for "Build Page" in Visual Studio 2005?
|visual-studio|
"Build Page" is one of the items you can add to your toolbar to compile just the ASPX page or ASCX control you are working on. Is there a keyboard shortcut for it?
Querying ActiveDirectory is pretty simple. You can find some good examples I've used before [here.][1] [1]: http://www.codeproject.com/KB/system/activedirquery.aspx
How to permanently remove a breakpoint in Visual Studio 2005 /2008 (ASP.NET, C#)
|visual-studio|
Often, when I have a breakpoint on some line in Visual Studio, The program will run and stop there. great. I will then click the red circle (or press F9) to remove it. Obviously I don't want my program to keep stopping there. The problem is that the next time I refresh the page the breakpoint is back! The only way to ...
How do I toggle Caps Lock in VB.NET?
|.net|windows|vb.net|
Using VB.NET, how do I toggle the state of Caps Lock?
My personal preference is to diligently encode *anything* that's coming from the database, business layer or from the user. In ASP.Net this is done by using `Server.HtmlEncode(string)` . The reason so encode anything is that even properties which you might assume to be boolean or numeric could contain malicious c...
From: http://www.vbforums.com/showthread.php?referrerid=61394&t=537891 Imports System.Runtime.InteropServices Public Class Form2 Private Declare Sub keybd_event Lib "user32" ( _ ByVal bVk As Byte, _ ByVal bScan As Byte, _ ByVal dwFlags As Integ...
// Get the application configuration file. System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration( ConfigurationUserLevel.None); // Create a connection string element and // save it to the configuration file. // Create a connection ...
No, when you use automatic properties you don't have any control over the implementation. The best option is to use a templating tool, code snippets or create a private SetValue`<T`>(ref T backingField, T value) which encapsulates the setter logic. private void SetValue<T>(ref T backingField, T value) { ...
There are 2 JVMs for WinMo, Mysaifu for J2SE and IBM WebSphere Everyplace Micro Environment for J2ME.
It depends whether you want it to edit Django templates, or content within the site? Any HTML based editor can be integrated to **edit content**, and the [Django TinyMCE module][1] would be my choice, although the other answers (e.g. FCKeditor) should also work fine. I don't think any of the HTML based editors wi...
I don't think any of the HTML based editors will work with the django templates, but rather the editable content areas within templates. The process for creating / editing Django templates is really to create a standard HTML page first (with CSS & images etc), then make that into a base template. Then you create ...
|sql|sql-server|database|t-sql|
Citation from Vista [speech recognition blog][1]: > In Windows Vista, Windows Speech > Recognition works in the current > language of the OS. That means that > in order to use another language for > speech recognition, you have to have > the appropriate language pack > installed. Language packs are > availa...
Thanks everyone for the answers. @Tom, @Chris Upchurch: The coordinates are fairly close to each others, and they are in a relatively small area of about 800 sq km. I guess I can assume the surface to be flat. I need to process the requests over and over again, and the response should be faster enough for more we...
From Federico Cargnelutti's [blog post][1]: > Features include file transformations (e.g. token > replacement, XSLT transformation, > Smarty template transformations), file > system operations, interactive build > support, SQL execution, CVS > operations, tools for creating PEAR > packages, and much more. ...
You can't register same DP twice. To comply with this constraint you should use static variable - it will be initialized only one time.
You can't register same DP twice. To comply with this constraint you should use static variable, it will be initialized only one time thus you will register DP one time only.
I see 2 reasons behind that requirement: 1. You can't register same DP twice. To comply with this constraint you should use static variable, it will be initialized only one time thus you will register DP one time only. 2. DP should be registered before any class (which uses that DB) instance created