input
stringlengths
51
42.3k
output
stringlengths
18
55k
How can I read raw (CF_HTML) clipboard data in a webpage or C#? <p>If I drag and drop a selection of a webpage from Firefox to HTML-Kit, HTML-Kit asks me whether I want to paste as text or HTML. If I select "text," I get this:</p> <pre><code>Version:0.9 StartHTML:00000147 EndHTML:00000516 StartFragment:00000181 EndFra...
<p>It is Microsoft specific, don't expect to see the same information in other OSes.<br /> Note that you get the same format when you copy a fragment from IE.</p> <p>I am not sure what you mean by "webpage-to-webpage drag and drop operation". To drop where? A textarea?</p> <p>I don't know C#, but in C/C++ application...
How do you make a generic memoize function in Haskell? <p>I've seen <a href="http://stackoverflow.com/questions/129877/how-do-i-write-a-generic-memoize-function">the other post about this</a>, but is there a clean way of doing this in Haskell?</p> <p>As a 2nd part, can it also be done without making the function monad...
<p>The package data-memocombinators on hackage provides lots of reusable memoization routines. The basic idea is:</p> <pre><code>type Memo a = forall r. (a -&gt; r) -&gt; (a -&gt; r) </code></pre> <p>I.e. it can memoize any function from a. The module then provides some primitives (like <code>unit :: Memo ()</code>...
How do you compare structs for equality in C? <p>How do you compare two instances of structs for equality in standard C?</p>
<p>C provides no language facilities to do this - you have to do it yourself and compare each structure member by member.</p>
KornShell (ksh) wraparound <p>Okay, I am sure this is simple but it is driving me nuts. I recently went to work on a program where I have had to step back in time a bit and use Redhat 9. When I'm typing on the command line from a standard xterm running KornShell (ksh), and I reach the end of the line the screen slides ...
<p>Did you do <code>man ksh</code>?</p> <p>You want to do a <code>set -o multiline</code>.</p> <p>Excerpt from <code>man ksh</code>:</p> <blockquote> <p>multiline: </p> <blockquote> <p>The built-in editors will use multiple lines on the screen for lines that are longer than the width of the sc...
How can I programmatically repair (not merely compact) an Access .mdb file? <p>I have a corrupt database. If I open it in MS Access, MS Access offers to repair it, and it succeeds.</p> <p>How can I do that with code? On a machine where MS Access is not installed.</p> <p>I know from trying it that JRO.JetEngine.Com...
<p>You need to go to <a href="http://support.microsoft.com" rel="nofollow">http://support.microsoft.com</a> and search for the JetComp.exe utility, which will attempt to repair and compact your MDB without opening the file. The reason none of the suggestions above work is because they have to open the MDB to do their w...
Which Haskell package contains given module <p>I know a Haskell module name, but I can't figure out in what package it is defined. This is bad because I can't compile without a package exposing this module.</p> <p>Specificaly it is Text.Regex that I can't locate, but I would like to know how to solve that problem in g...
<p><a href="http://www.haskell.org/ghc/docs/latest/html/users_guide/packages.html">http://www.haskell.org/ghc/docs/latest/html/users_guide/packages.html</a></p> <p>ghc-pkg find-module Text.Regex</p> <p>But that only works for (a) recent GHCs, and (b) packages installed on your system.</p> <p>You can also grep throug...
class with valueTypes fields and boxing <p>I'm experimenting with generics and I'm trying to create structure similar to Dataset class.<br> I have following code</p> <pre><code>public struct Column&lt;T&gt; { T value; T originalValue; public bool HasChanges { get { return !value.Equals(origina...
<p>As you asked for examples from functional languages; in lisp you could prevent the writing of all that code upon each addition of a column by using a macro to crank the code out for you. Sadly, I do not think that is possible in C#. </p> <p>In terms of performance: the macro would be evaluated at compile time (thus...
jQuery override form submit not working when submit called by javascript on a element <p>I've got a page with a normal form with a submit button and some jQuery which binds to the form submit event and overrides it with <code>e.preventDefault()</code> and runs an AJAX command. This works fine when the submit button is ...
<p>A couple of suggestions:</p> <ul> <li>Overwrite the submit function to do your evil bidding</li> </ul> <pre><code> var oldSubmit = form.submit; form.submit = function() { $(form).trigger("submit"); oldSubmit.call(form, arguments); } </code></pre> <ul> <li>Why not bind to all the &lt;a&...
Can XPath do a foreign key lookup across two subtrees of an XML? <p>Say I have the following XML...</p> <pre><code>&lt;root&gt; &lt;base&gt; &lt;tent key="1" color="red"/&gt; &lt;tent key="2" color="yellow"/&gt; &lt;tent key="3" color="blue"/&gt; &lt;/base&gt; &lt;bucket&gt; &lt;tent key="1"/&gt;...
<p>If you're using XSLT, I'd recommend setting up a key:</p> <pre><code>&lt;xsl:key name="tents" match="base/tent" use="@key" /&gt; </code></pre> <p>You can then get the <code>&lt;tent&gt;</code> within <code>&lt;base&gt;</code> with a particular <code>key</code> using</p> <pre><code>key('tents', $id) </code></pre> ...
C# Lambda Expressions or Delegates as a Properties or Arguments <p>I'm looking to create an ValidationRule class that validates properties on an entity type object. I'd really like to set the name of the property to inspect, and then give the class a delegate or a lambda expression that will be evaluated at runtime wh...
<p>Really, what you want to use is <code>Func&lt;T,bool&gt;</code> where T is the type of the item you want to validate. Then you would do something like this</p> <pre><code>validator.AddValidation(item =&gt; (item.HasEnoughInformation() || item.IsEmpty()); </code></pre> <p>you could store them in a <code>List&lt;Fun...
VBScript Excel Formatting .xlsx files <p>Basically I want to know how to set center alignment for a cell using VBScript...</p> <p>I've been googling it and can't seem to find anything that helps.</p>
<pre><code>Set excel = CreateObject("Excel.Application") excel.Workbooks.Add() ' create blank workbook Set workbook = excel.Workbooks(1) ' set A1 to be centered. workbook.Sheets(1).Cells(1,1).HorizontalAlignment = -4108 ' xlCenter constant. workbook.SaveAs("C:\NewFile.xls") excel.Quit() set excel = nothing 'If t...
Explicit code parallelism in c++ <p>Out of order execution in CPUs means that a CPU can reorder instructions to gain better performance and it means the CPU is having to do some very nifty bookkeeping and such. There are other processor approaches too, such as hyper-threading.</p> <p>Some fancy compilers understand t...
<p>Given optimizing compilers and pipelined processors, I would suggest you just write clear, readable code.</p>
Setting up our new Dev server What is the easiest way to assign multiple IP addresses <p>I'm setting up our new Dev server, what is the easiest way to assign multiple IP addresses to Windows 2008 Server Network Adapter?</p> <p>I'm setting up our development machine, running IIS 7 and want to have the range between 192...
<pre><code>&gt; netsh interface ipv4 add address "Local Area Connection" 192.168.1.201 255.255.255.0 </code></pre> <p>Wrap in a cmd.exe "for" loop to add multiple IPs.</p> <p>EDIT: (from Brian) "Local Area Connection" above is a placeholder, make sure you use the actual network adapter name on your system.</p>
How do you version your projects? <p>I understand that Microsoft uses this template when versioning their products: Major.Minor.Build.Revision. </p> <p>Major is changed when the "developers" want to show that there is a big change in the software and backward compatibility cannot be assumed. Maybe a major rewrite of t...
<p>See this: <a href="http://stackoverflow.com/questions/65718/what-do-the-numbers-in-a-version-typically-represent-ie-v1901">SO version number question</a></p>
What's the best way to format 24 hour time in XSLT 1.0? <p>I've had a hard time finding good ways of taking a time format and easily determining if it's valid then producing a resulting element that has some formatting using XSLT 1.0.</p> <p>Given the following xml:</p> <pre><code>&lt;root&gt; &lt;srcTime&gt;2300...
<p>There aren't any regular expressions in XSLT 1.0, so I'm afraid that pattern matching isn't going to be possible.</p> <p>I'm not clear if <code>&lt;srcTime&gt;23:00&lt;/srcTime&gt;</code> is supposed to be legal or not? If it is, try:</p> <pre><code>&lt;dstTime&gt; &lt;xsl:if test="string-length(srcTime) = 4 or ...
Java: Enum parameter in method <p>I have a method lets say:</p> <pre><code>private static String drawCellValue( int maxCellLength, String cellValue, String align) { } </code></pre> <p>and as you can notice, I have a parameter called align. Inside this method I'm going to have some if condition on whether the valu...
<p>This should do it:</p> <pre><code>private enum Alignment { LEFT, RIGHT }; String drawCellValue (int maxCellLength, String cellValue, Alignment align){ if (align == Alignment.LEFT) { //Process it... } } </code></pre>
What are the main differences between the popular web frameworks? <p>There are <a href="http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks">lots of web application frameworks</a> available these days, for pretty much every language out there. In your experience, what are their strengths, weaknesses,...
<p>I am going to briefly address each area for three popular Python frameworks. This is only based on my personal experiences and observations.</p> <h2>Development speed and convenience</h2> <p>For <strong>TurboGears</strong>, <strong>Pylons</strong>, and <strong>Django</strong>, development speed is roughly equal. B...
Calling Reporting services rdl in Java application <p>I have developed my reports in SQL REporting services and deployed in my server. I need to display the reports in my java application page. I want to know is there any control (like .net report viewer control) to display this</p> <p>Thanks balaweblog</p>
<p>I don't know about a control, but if you just need to display reports and not provide much interaction you could use the report server web service and call it's render method. This would allow you to execute and return the report output in a number of formats. So you could have java code accepting parameters which...
Can I implement a cooperative multi-tasking system in VxWorks? <p>A legacy embedded system is implemented using a cooperative multi-tasking scheduler. </p> <p>The system essentially works along the following lines:</p> <ul> <li>Task A does work</li> <li>When Task A is done, it yields the processor.</li> <li>Task B g...
<p>While VxWorks is a priority based OS, it is possible to implement this type of cooperative multi-tasking.</p> <p>Simply put all the tasks at the <strong>same</strong> priority.<br /> In your code, where you do your <em>yield</em>, simply insert a 'taskDelay(0);'</p> <p>Note that you have to make sure the kernel ti...
How do you acess a property of a bean for reading in a spring xml config file? <p>I want to do something like the following in spring:</p> <pre><code>&lt;beans&gt; ... &lt;bean id="bean1" ... /&gt; &lt;bean id="bean2"&gt; &lt;property name="propName" value="bean1.foo" /&gt; ... </code></pre> <p>I ...
<p>You need to use <a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/beans/factory/config/PropertyPathFactoryBean.html">PropertyPathFactoryBean</a>:</p> <pre> &lt;bean id="bean2" depends-on="bean1"&gt; &lt;property name="propName"&gt; &lt;bean class="org.sprin...
How to get CreateProcess/CreateProcessW to execute a process in a path > MAX_PATH characters <p>I'm trying to get either CreateProcess or CreateProcessW to execute a process with a name &lt; MAX&#95;PATH characters but in a path that's greater than MAX&#95;PATH characters. According to the docs at: <a href="http://msd...
<p>Embedding the manifest and using GetShortPathNameW did it for me. One or the other on their own wasn't enough.</p> <p>Before calling CreateProcessW using the \\?-prefixed absolute path name of the process to execute as the first argument, I check:</p> <pre> wchar&#95;t *w_argv0; wchar&#95;t *w_short_argv0; ... ...
Design Time viewing for User Control events <p>I've create a WinForms control that inherits from System.Windows.Forms.UserControl...I've got some custom events on the control that I would like the consumer of my control to be able to see. I'm unable to actually get my events to show up in the Events tab of the Properti...
<p>Make sure your events are exposed as public. For example...</p> <pre><code>[Browsable(true)] public event EventHandler MyCustomEvent; </code></pre>
What are your "hard rules" about commenting your code? <p>I have seen the other questions <em>but I am still not satisfied with the way this subject is covered</em>.</p> <p><strong>I would like to extract a distiled list of things to check on comments at a code inspection.</strong> </p> <p>I am sure people will say t...
<p>I have one simple rule about commenting: Your code should tell the story of what you are doing; your comments should tell the story of why you are doing it.</p> <p>This way, I make sure that whoever inherits my code will be able to understand the intent behind the code.</p>
Is the PageAction.Details route necessary in the default Dynamic Data template? <p>In the default Visual Studio template for a dynamic data web application, Global.asax includes the following two sample routes.</p> <pre><code>// route #1 routes.Add(new DynamicDataRoute("{table}/ListDetails.aspx") { Action = PageAc...
<p>You're right, route #2 isn't going to be used in this instance. The only time route #2 would come into play is if you were requesting a details page URL from the route engine. Because the ListDetails.aspx page template handles both the list and details views, it never requests a details template URL.</p>
mathematical optimization library for Java --- free or open source recommendations? <p>Does anyone know of such a library that performs mathematical optimization (linear programming, convex optimization, or more general types of problems)? I'm looking for something like MATLAB, but with the ability to handle larger pro...
<p>A good answer is dependent on what you mean by "convex" and "more general" If you are trying to solve large or challenging linear or convex-quadratic optimization problems (especially with a discrete component to them), then it's hard to beat the main commercial solvers, <a href="http://www.gurobi.com">gurobi</a>, ...
How to synchronize two Subversion repositories? <p>My company has a subsidiary with a slow Internet connection. Our developers there suffer to interact with our central <a href="http://en.wikipedia.org/wiki/Subversion%5F%28software%29">Subversion</a> server. Is it possible to configure a slave/mirror for them? They wo...
<p>It is possible but not necessarily simple: the problem you are trying to solve is dangerously close to setting up a distributed development environment which is not exactly what SVN is designed for.</p> <p><strong>The SVN-mirror way</strong></p> <p>You can use <code>svn mirror</code> as explained in the SVN book d...
Bron-Kerbosch algorithm for clique finding <p>Can anyone tell me, where on the web I can find an explanation for Bron-Kerbosch algorithm for clique finding or explain here how it works?</p> <p>I know it was published in "Algorithm 457: finding all cliques of an undirected graph" book, but I can't find free source that...
<p>i find the explanation of the algorithm here: <a href="http://www.dfki.de/~neumann/ie-seminar/presentations/finding_cliques.pdf">http://www.dfki.de/~neumann/ie-seminar/presentations/finding_cliques.pdf</a> it's a good explanation... but i need a library or implementation in C# -.-'</p>
Create cronjob with Zend Framework <p>I am trying to write a cronjob controller, so I can call one website and have all modules cronjob.php executed. Now my problem is how do I do that?</p> <p>Would curl be an option, so I also can count the errors and successes?</p> <p>[Update]</p> <p>I guess I have not explained i...
<p>After some research and a lot procrastination I came to the simple conclusion that a ZF-ized cron script should contain all the functionality of you zend framework app - without all the view stuff. I accomplished this by creating a new cronjobfoo.php file in my application directory. Then I took the bare minimum fr...
Java: Text to Speech engines overview <p>I'm now in search for a Java Text to Speech (TTS) framework. During my investigations I've found several JSAPI1.0-(partially)-compatible frameworks listed on <a href="http://java.sun.com/products/java-media/speech/reference/codesamples/index.html">JSAPI Implementations page</a>,...
<p>I've actually had pretty good luck with <a href="http://freetts.sourceforge.net/">FreeTTS</a></p>
How can I modify a saved Microsoft Access 2007 or 2010 Import Specification? <p>Does anyone know how to modify an existing import specification in Microsoft Access 2007 or 2010? In older versions there used to be an Advanced button presented during the import wizard that allowed you to select and edit an existing spec...
<p>I am able to use this feature on my machine using MS Access 2007.</p> <ul> <li>On the Ribbon, select External Data </li> <li>Select the "Text File" option </li> <li>This displays the Get External Data Wizard </li> <li>Specify the location of the file you wish to import </li> <li>Click OK. This displays the "Imp...
linker woes - undefined reference <p>I'm having a problem with my compiler telling me there is an 'undefined reference to' a function I want to use in a library. Let me share some info on the problem:</p> <ul> <li>I'm cross compiling with gcc for C.</li> <li>I am calling a library function which is accessed through an...
<p>It sounds like you are not compiling the .c file in the library to produce a .o file. The linker would look for the prototype's implementation in the .o file produced by compiling the library </p> <p>Does your build process compile the library .c file?</p> <p>Why do you call it a "library" if it's actually just s...
Where can I find open source 2d bin packing algorithms? <p>I'm looking for open source (preferably c++) algorithms for 2d bin packing of rectangular and or irregular shapes. I've found several papers on the subject but no code.</p>
<p>Here is the best to my knowledge about rectangular bin packing:</p> <p><a href="http://clb.demon.fi/projects/rectangle-bin-packing" rel="nofollow">http://clb.demon.fi/projects/rectangle-bin-packing</a></p>
What's the best system for installing a Perl web app? <p>It seems that most of the installers for Perl are centered around installing Perl modules, not applications. Things like ExtUtils::MakeMaker and Module::Build are very well suited for modules, but require some additional work for Web Apps.</p> <p>Ideally it wou...
<p>The answer suggesting RPM is definitely a good one. Using your system's package manager can definitely make your life easier. However, it might mean you also need to package up a bunch of other Perl modules.</p> <p>You might also take a look at <a href="http://search.cpan.org/dist/Shipwright/" rel="nofollow">Shipwr...
MySQL and data file encryption <p>Is there a way to encrypt the data file that mysql uses? I have a mysql server on an open machine, and I would like to encrypt the data file so even if someone copies the data files, they cannot read the data.</p> <p>Thanks</p>
<p>To anyone researching a transparent MySQL encryption solution <strong>for Linux</strong>, there's a relatively new product on the block that we've been working with: <a href="http://www.gazzang.com/" rel="nofollow">http://www.gazzang.com/</a></p> <p>I am not affiliated with Gazzang... just a happy customer.</p>
What books should I read to have an undergraduate education in Computer Science? <p>I've always been a largely independent learner gleaning what I can from Wikipedia and various books. However, I fear that I may have biased my self-education by inadvertent omission of topics and concepts. My goal is to teach myself the...
<p>Biggest two omissions I see:</p> <ul> <li><a href="http://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools" rel="nofollow">The Dragon Book</a></li> <li><a href="http://rads.stackoverflow.com/amzn/click/0130661023" rel="nofollow">Computer Networks</a></li> </ul> <p>For operating systems I prefer t...
How does Multiple C++ Threads execute on a class method <p>let's say we have a c++ class like:</p> <pre><code>class MyClass { void processArray( &lt;an array of 255 integers&gt; ) { int i ; for (i=0;i&lt;255;i++) { // do something with values in the array } } } </code></pre> <p>an...
<p><code>i</code> is allocated on the stack. Since each thread has its own separate stack, each thread gets its own copy of <code>i</code>.</p>
Database Design <p>I need to create a database to store simulation results. What resources are out there to help me design this?</p> <p>EDIT: For those who want more details...</p> <p>We work with a discrete event simulation used by the military. Important simulation events are thus when weapons are fired, when kil...
<p>Provide the following and you'll get a helpful answer</p> <ol> <li>Database type (MsSQL, MySQL etc)</li> <li>Any other languages you are using with this (C#, PHP)</li> <li>The data you want to store</li> <li>What you plan to do with the data (it may affect how best to store and query it), this step is very optional...
How do I deploy an ADF business component? <p>How do I deploy an ADF business component to the middle tier and call it using <a href="http://en.wikipedia.org/wiki/Java_remote_method_invocation" rel="nofollow">RMI</a>?</p> <p>I just cannot find any good documentation on this!</p>
<p>Select the ADF BC application module and use your right button to create a business components deployment and select <a href="http://en.wikipedia.org/wiki/Enterprise_JavaBean" rel="nofollow">EJB</a> session bean. This will create different <a href="https://en.wikipedia.org/wiki/EAR_%28file_format%29" rel="nofollow">...
How can I be sure the whole MySQL DB is loaded in memory? <p>I am running a mysql server. I would like to somehow make sure that the whole DB is loaded into the ram as I heard it would be alot faster.</p> <p>Is this true? and how do I vertify it?</p>
<p>If you are using InnoDB, then you can set innodb_buffer_pool_size to be at least as large as your data and indexes. Then as you access data, it will be cached into memory and all subsequent accesses will occur via memory.</p> <p>If you wanted to pre-cache the data, you could do some of your common queries, or full...
How to get the RGB values for a pixel on an image on the iphone <p>I am writing an iPhone application and need to essentially implement something equivalent to the 'eyedropper' tool in photoshop, where you can touch a point on the image and capture the RGB values for the pixel in question to determine and match its col...
<h2>A little more detail...</h2> <p>I posted earlier this evening with a consolidation and small addition to what had been said on this page - that can be found at the bottom of this post. I am editing the post at this point, however, to post what I propose is (at least for my requirements, which include modifying pix...
Simple basic explanation of a Distributed Hash Table (DHT) <p>Could any one give an explanation on how a DHT works?</p> <p>Nothing too heavy, just the basics.</p>
<p>Ok, they're fundamentally a pretty simple idea. A DHT gives you a dictionary-like interface, but the nodes are distributed across the network. The trick with DHTs is that the node that gets to store a particular key is found by hashing that key, so in effect your hash-table buckets are now independent nodes in a net...
Ruby: How to break a potentially unicode string into bytes <p>I'm writing a game which is taking user input and rendering it on-screen. The engine I'm using for this is entirely unicode-friendly, so I'd like to keep that if at all possible. The problem is that the rendering loop looks like this:</p> <pre><code>"stri...
<p>Unfortunately ruby 1.8.x has poor unicode support. It's being addressed in 1.9. But in the mean time, libraries like this one (<a href="http://snippets.dzone.com/posts/show/4527" rel="nofollow">http://snippets.dzone.com/posts/show/4527</a>) are a good solution. Using the linked library, your code would look somet...
== or .Equals() <p>Why use one over the other?</p>
<p>== is the identity test. It will return true if the two objects being tested are in fact the same object. <code>Equals()</code> performs an equality test, and will return true if the two objects consider themselves equal.</p> <p>Identity testing is faster, so you can use it when there's no need for more expensive e...
SQL Server: Dynamic where-clause <p><strong>Problem:</strong></p> <p>Ajax suggest-search on [<em>n</em>] ingredients in recipes. That is: match recipes against multiple ingredients.</p> <p>For instance: <code>SELECT Recipes using "flower", "salt"</code> would produce: <code>"Pizza", "Bread", "Saltwater"</code> and so...
<p>You have two options. If you're using SQL Server 2008 (or Oracle) you can pass in a <a href="http://www.sqlteam.com/article/sql-server-2008-table-valued-parameters" rel="nofollow">table value parameter</a>. </p> <p>If you're using SQL Server 2005, you can use <a href="http://weblogs.asp.net/jgalloway/archive/2007/0...
Specifying the type of ArrayList's elements <p>I thought that there was some way in .net 3.0 to give an array list a type so that it didnt just return Object's but I'm having trouble doing so. Is it possible? If so, how?</p>
<p><code>List&lt;T&gt;</code> was introduced with generics in .NET 2.0:</p> <pre><code>using System.Collections.Generic; var list = new List&lt;int&gt;(); list.Add(1); list.Add("string"); //compile-time error! int i = list[0]; </code></pre>
Robust and easy to implement serial bus (automotive application) <p>What serial communication bus would you use in a automotive embedded system if your main selection criteria were: </p> <ul> <li>Electrically robust </li> <li>Slow speed (32 kb/s) </li> <li>Easy to program </li> <li>Easy to interface with microcont...
<p>You've already chosen the AT90CAN128, whose standout feature compared to other AVR processors is support for the CAN bus. There really is not a better choice than CAN for an automotive application with your data rate and noise immunity requirements. If you march in to an automotive customer with anything other than ...
How do I allow a user to use their own domain name for a hosted service? <p>I am working on an ASP.NET MVC web app that allows people to publish content, but other than publish the content to a remote server, I want to allow people to use their domain name directly. For example, the user "Tom" can have his domain name...
<p>This require multiple steps.</p> <p>First you have to find out how your users will configure their domain to have a CNAME record for you site. You can archieve this in a number of ways where the best is education. Making partnerships with hosting providers requires a great deal of volume.</p> <p>In IIS this will r...
Teaching: Field, Class & Package Relationships <p>In general I think I can convey most programming related concepts quite well.<br /> Yet, I still find it hard to summarise the relationship between Fields, Classes and Packages.</p> <p><br> <strong>How do You summarise "Fields", "Classes" and "Packages" and "Their Rela...
<p>I've faced a similar problem since I taught C, C++, and Java. Here is what I do:</p> <p>First, I keep packages separately and explain them in the end.</p> <p>Ideally, in my opinion, students should first learn about ADTs, preferably in C. They have the struct, they have the separate operations on it. Fields are th...
Things to consider when writing for touch screen? <p>I'm starting a new project which involves developing an interface for a machine that measures wedge and roundness of lenses and stores the information in a database and reports on it. There's a decent chance we're going to be putting a touch screen on this machine so...
<p>A few things to consider:</p> <ul> <li><p>You need to account for parallax error when touching controls. Basically, the user may touch the screen above or below your actual control and therefore miss the control. This is a combination of the size of the control (eg you can have the active area larger than visual co...
jQuery get textarea text <p>Recently I have started playing with jQuery, and have been following a couple of tutorials. Now I feel slightly competent with using it (it's pretty easy), and I thought it would be cool if I were able to make a 'console' on my webpage (as in, you press the ` key like you do in <a href="http...
<p>Why would you want to convert key strokes to text? Add a button that sends the text inside the textarea to the server when clicked. You can get the text using the value attribute as the poster before has pointed out, or using jQuery's API:</p> <pre><code>$('input#mybutton').click(function() { var text = $('text...
How to judge the strength of a directed acyclic graph? <p>Curious what is recognized as a solid algorithm/approach for judging the strength of a directed acyclic graph - particularly the strength of certain nodes. The main question I have about this can be boiled down to the following two graphs:</p> <p> (if graph do...
<p>This really depends on what you mean by strength. Because of the versatility of the DAG in representing information, you could be discussing anything from a multiple-outcome control flow to argument clauses of non-adverbial discourse connectives or even the full set of dependencies between different words in a sent...
Can I get the current page sourcecode from a firefox extension? <p>Can this be done? How?</p> <p><hr /></p> <p>I want to write my own extension. Can Get the current page sorcecode in my own extension?</p>
<p>As Rich says, adding <code>view-source</code> in front of the URL will give you the current page's source code. A keyboard shortcut for this is <code>Ctrl+U</code>.</p> <blockquote> <p>I want to write my own extension.</p> </blockquote> <p>There are a number of existing Firefox extensions that fetch a page's sou...
Implementing multithreading in C# (code review) <p>Greetings.</p> <p>I'm trying to implement some multithreaded code in an application. The purpose of this code is to validate items that the database gives it. Validation can take quite a while (a few hundred ms to a few seconds), so this process needs to be forked off...
<p>The thread pool is a convenient choice if you have <em>light weight</em> sporadic processing that isn't time sensitive. However, I recall reading on MSDN that it's not appropriate for large scale processing of this nature.</p> <p>I used it for something quite similar to this and regret it. I took a worker-thread ap...
What's the future of the web? XHTML 2, HTML 5, or something else? <p>I'm confused by the discussion and advancement both of a new version of HTML and a new version of XHTML. Are they competitors? If so, what is likeliest to be the adopted future of the web? If not, what is the differing non-competing purpose for each?<...
<p>HTML 5 is meant for web applications whereas XHTML2 is meant for documents. From the <a href="http://www.w3.org/TR/html5/introduction.html#relationship0" rel="nofollow">HTML 5 working draft</a>:</p> <blockquote> <p>XHTML2 defines a new HTML vocabulary with better features for hyperlinks, multimedia content, annot...
Distributing iPhone applications 2.1 vs 2.0 <p>Can iPhone applications compiled against 2.1 be successfully installed via iTunes on a 2.0 device?</p> <p>I know iPhone applications compiled with 2.1 can <em>run</em> on a 2.0 device (assuming they're not using anything new from 2.1). But am not sure if iTunes will let t...
<p>I believe apps that are compiled against 2.1 will be marked as "Requires iPhone 2.1 Softwar Update" when viewed through iTunes. (but not when viewed from an iPhone - the iPhone's App Store app only displays a subset of an app's metadata.)</p> <p>One example: <a href="http://phobos.apple.com/WebObjects/MZStore.woa/w...
C++ performance vs. Java/C# <p>My understanding is that C/C++ produces native code to run on a particular machine architecture. Conversely, languages like Java and C# run on top of a virtual machine which abstracts away the native architecture. Logically it would seem impossible for Java or C# to match the speed of C...
<h2>JIT vs. Static Compiler</h2> <p>As already said in the previous posts, JIT can compile IL/bytecode into native code at runtime. The cost of that was mentionned, but not to its conclusion:</p> <p>JIT has one massive problem is that it can't compile everything: JIT compiling takes time, so the JIT will compile only...
Algorithm to estimate number of English translation words from Japanese source <p>I'm trying to come up with a way to estimate the number of English words a translation from Japanese will turn into. Japanese has three main scripts -- <a href="http://en.wikipedia.org/wiki/Kanji" rel="nofollow">Kanji</a>, <a href="http:/...
<p>Here's what Borland (now Embarcadero) thinks about English to non-English:</p> <p><a href="http://www.podgoretsky.com/ftp/Docs/Delphi/D5/dg/intapps.html" rel="nofollow">Length of English string (in characters)</a></p> <pre><code>Expected increase 1-5 100% 6-12 80% 13-20 60% 21-30 40% 31-50 20...
Calling C/C++ from python? <p>What would be the quickest way to construct a python binding to a C or C++ library?</p> <p>(using windows if this matters)</p>
<p>I like <a href="http://docs.python.org/2/library/ctypes.html">ctypes</a> a lot, <a href="http://www.swig.org/">swig</a> always tended to give me <a href="http://groups.google.com/group/comp.lang.python/browse_thread/thread/d94badd9847fe43a?pli=1">problems</a>. Also ctypes has the advantage that you don't need to sat...
Wide exec for C/C++ <p>Is there a <code>wchar_t</code> version of <code>exec[lv][pe]</code> (i.e. an <code>exec</code> that uses <code>wchar_t</code> as path and <code>wchar_t</code> as arguments)? In <code>Windows</code>, I can just do <code>CreateProcessW(process, cmdline)</code>, but in <code>*nix</code>, I'm stuck ...
<p>There is not. In UNIX, it's customary to use UTF-8 when interacting with the environment.</p>
How do I dictate the destination folder of a clickOnce application? <p>How do I dictate the destination folder of a clickOnce application?</p>
<p>This is not possible with ClickOnce. ClickOnce applications are always installed in the <code>Apps</code> subdirectory of local application data.</p>
Is there any performance difference in using .resx file and satellite assembly? <p>Which is the best way to go forward while building a localized aspx web application, .resx files of satellite assemblies? Is there any performance comparisons available any where on web?</p>
<p>Well I don't know if the comparison is valid.. </p> <p>ResX is a storage format for storing resources in XML. It gets compiled to a binary form (.resources) with the resgen tool before it gets embedded (if so specified) into the assembly.</p> <p>Satellite assembly is a diff/delta of your main assembly resources an...
Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005) <p>I have an application written using VS2005 in C# targeting the Compact Framework 2.0 SP2. As part of the solution, I have CAB deploy project which deploys to the device without a problem. What I can't do is create a shortcut to my application on t...
<p>A bit late but maybe this will help somebody like me who searched for this issue, I solved the problem like this:</p> <p>I added a custom folder on the root node (File System on Local Machine) and called it %CE3%. That is the shortcut for \Windows\Desktop. I added my shortcut (right click create new shortcut) and g...
Why Stackoverflow binds user actions dynamically with javascript? <p>Checking the HTML source of a question I see for instance:</p> <pre><code>&lt;a id="comments-link-xxxxx" class="comments-link"&gt;add comment&lt;/a&gt;&lt;noscript&gt;&amp;nbsp;JavaScript is needed to access comments.&lt;/noscript&gt; </code></pre> ...
<ul> <li>You don't have to type the same string over and over again in the HTML (which if nothing else would increase the number of typos to debug)</li> <li>You can hand over the HTML/CSS to a designer who need not have any javascript skills</li> <li>You have programmatic control over what callbacks are called and when...
Best way to sandbox Apache on Linux <p>I have Apache running on a public-facing Debian server, and am a bit worried about the security of the installation. This is a machine that hosts several free-time hobby projects, so none of us who use the machine really have the time to constantly watch for upstream patches, stay...
<p>Chroot jails can be really insecure when you are running a complete sandbox environment. Attackers have complete access to kernel functionality and for example may mount drives to access the "host" system.</p> <p>I would suggest that you use linux-vserver. You can see linux-vserver as an improved chroot jail with a...
Existing Standard Style and Coding standard documents <p>The following have been proposed for an upcoming C++ project.</p> <ul> <li>C++ Coding Standards, by Sutter and Alexandrescu</li> <li>JSF Air Vehicle C++ coding standards</li> <li>The Elements of C++ Style</li> <li>Effective C++ 3rd Edition, by Scott Meyers</li>...
<p><a href="http://rads.stackoverflow.com/amzn/click/0321113586">C++ Coding Standards: 101 Rules, Guidelines, and Best Practices</a> (C++ In-Depth Series) by Herb Sutter and, Andrei Alexandrescu.</p>
What techniques do you use to maximise code reuse? <p>Some years ago I was told about a study into code reuse. Apparently it was found that, on average, programmers have a 7 minute window when searching for code to reuse. If they don't find code that suits their needs within that window they'll write their own.</p> <p...
<p>A complex question:</p> <ul> <li><p>Some parts of the code can be generalized as libraries or APIs. We have a common library which is kept up to date with solutions to common problems. Typically: validation, caching, data access classes, logging, etc...</p></li> <li><p>Some parts are application specific. They cann...
Firefox Sidebar and Document object of DOM <p>There is a webpage loaded in the firefox sidebar and another webpage loaded in the main document. Now, how do I ask access the main document object through the Firefox sidebar? An example to do this through Javascript code in the firefox sidebar document to access the main ...
<p>As far as I can tell, you are actually loading a web site in the sidebar (checked the 'Load this bookmark in Sidebar'). If this is the case, AND if the sidebar is opening the main window page. You can use the window.postMessage to communicate between them. But like I said, the sidebar page has to open the main page ...
Favorite image file format for 2d sprites <p>What is your favorite, lossless image format for games (namely 2d games)? And why?</p> <p>Some things to take into consideration are size on disk, overhead for converting to a usable format, and features of the format (ie alpha support).</p> <p>There is no best answer, but...
<p>I'd suggest PNG. Most software supports writing it, most libraries support reading it, it's lossless and supports alpha transparency. And it's a standard format.</p> <p>And, maybe important for hobbyist 2D games, very small images also result in very small files (i.e. a 16x16 icon can be 1KB or less).</p>
How do I get a stack trace in OCaml? <p>The Objective Caml language will only produce stack traces if you ask for them just right - what are the requirements for both bytecode and native code?</p>
<p>Compile with -g and set environment variable OCAMLRUNPARAM=b</p>
How can I determine that Windows Installer is performing an upgrade rather than a first time install? <p>I have an install that upgrades a previous version of an app if it exits. I'd like to skip certain actions when the install is upgrade mode. How can I determine if the install is running in upgrade mode vs. first ti...
<p>Can you elaborate what kind of tools are you using to create this installer?</p> <p>I use Windows Installer XML(<a href="http://wix.sourceforge.net/" rel="nofollow">WIX</a>). In WIX you could do something like this:</p> <pre><code> &lt;!-- Property definitions --&gt; &lt;?define SkuName = "MyCoolApp"?&gt; &lt...
Making Eclipse behave like Visual Studio <p>I'm doing some Android dev, and I much prefer Visual Studio, but I'll have to use <em>Eclipse</em> for this.</p> <p>Has anyone made a tool that switches <em>Eclipse</em> to look and behave more like visual studio? I mainly can't stand its <strong>clippyesqe</strong> suggesti...
<p>Have you tried using the Visual Studio keybindings available in Eclipse Ganymede (3.4)?</p> <p>(You may want to know that "IntelliSense" is a Visual Studio-term, an probably unknown to anyone without Visual Studio-experience. "Autocompletion" is probably a more widely used term.)</p>
Is it possible to programmatically change a user's screen saver and/or desktop background? <p>I have been asked to standardize the screen saver and desktop background used by everyone in my company and, aside from going around to each PC individually, I'm looking for a programmatic way to accomplish this. I am not a s...
<p>Why not just use <a href="http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/prork/prdb_cdk_ugxd.mspx?mfr=true">Group Policies</a>?</p>
OpenGL: How to do RGBA->RGBA blitting without changing destination alpha <p>I have an OpenGL RGBA texture and I blit another RGBA texture onto it using a framebuffer object. The problem is that if I use the usual blend functions with <code>glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA), </code> the resulting blit c...
<p>You can set the blend-modes for RGB and alpha to different equations:</p> <pre><code>void glBlendFuncSeparate( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); </code></pre> <p>In your case you want to use the following enums:</p> <pre><code> glBlendFuncSeparate(GL_SRC_ALPHA, G...
nant: Can I extract the last directory in a path? <p>In Nant, I would like to be able to extract the last name of the directory in a path.<br /> For example, we have the path 'c:\my_proj\source\test.my_dll\'</p> <p>I would like to pass in that path and extract 'test.my_dll'</p> <p>Is there a way to easily do this?</p...
<p>You can actually do it with existing NAnt string functions. Just a bit ugly...</p> <pre><code>${string::substring(path, string::last-index-of(path, '\') + 1, string::get-length(path) - string::last-index-of(path, '\') - 1)} </code></pre>
Push or Pull? Turning keypresses into velocity for in-game vehicles <p>Should I push keypresses to vehicles when they're pressed, or should vehicles pull keys pressed from the engine?</p> <p>I have a vehicle object, which has location, velocity and accelleration members (among other things) and an update method, durin...
<p>You should try and follow an <a href="http://en.wikipedia.org/wiki/Observer_pattern" rel="nofollow">Subscribing/Observer</a> pattern. You put all the key capture code into one <a href="http://en.wikipedia.org/wiki/Singleton_pattern" rel="nofollow">singleton</a> InputManager and then each object that requires reactio...
Enhancing Performance in Real-Time Systems <p>First, I'd like to establish the acceptable end-to-end latency for a real-time system in the financial world is less than 200ms. Okay, here's what I'm after. In the design of real-time systems, there are "design patterns" (or techniques) that will increase the performance (...
<p>For general real-time system work, the classic rule is to go after variability and kill it. Real hard real-time means using static schedules, streamlined operating systems, efficient device drivers, and rock-hard priorities. No dynamic or adaptive stuff is feasible, if you really want computation X to end within a ...
Java printf functionality for collections or arrays <p>In python you can use a tuple in a formatted print statement and the tuple values are used at the indicated positions in the formatted string. For example:</p> <pre><code>&gt;&gt;&gt; a = (1,"Hello",7.2) &gt;&gt;&gt; print "these are the values %d, %s, %f" % a th...
<p>printf will have a declaration along the lines of:</p> <pre><code>public PrintString printf(String format, Object... args); </code></pre> <p>... means much the same as <code>[]</code>. The difference is <code>...</code> allows the caller to omit explicitly creating an array. So consider:</p> <pre><code> out.pr...
How do I get the resolution of the main monitor in Mac OS X in C++? <p>I have a graphical app that needs to test the resolution of the display it is starting up on in Mac OS X to ensure it is not larger than the resolution. This is done before the window itself is initialized. </p> <p>If there is more than one displ...
<p>Using CoreGraphics:</p> <pre><code>CGRect mainMonitor = CGDisplayBounds(CGMainDisplayID()); CGFloat monitorHeight = CGRectGetHeight(mainMonitor); CGFloat monitorWidth = CGRectGetWidth(mainMonitor); </code></pre> <p>More information at Apple's <a href="http://developer.apple.com/documentation/GraphicsImaging/Refere...
How to programmatically simulate XP's "Windows Security" start menu option on Windows 2000 <p>I'm trying to find a way to invoke the Ctrl+Alt+Delete dialog on a Windows 2000 computer that I'm connected to via Remote Desktop. Windows XP and 2003 include a new start menu command called "Windows Security" that does this, ...
<p>My coworker found the way to accomplish this directly: Start | Settings | Windows Security. If it's not present, it may have been disabled via Group Policy (<a href="http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/gp/1.mspx?mfr=true" rel="nofollow">Technet</a>).</p>
Glassfish: Deploying application in domain failed; Error loading deployment descriptors - invalid bit length repeat <p>I'm trying to deploy a .war trough the server's web interface. Getting the same error when deploying it as an exploded directory with IDEA. What is the solution to this problem?</p>
<p>The message points to an exception in java.util.zip thus implicating a corrupted packed file. Maybe you could try rebuilding the war file.</p>
Development with a tablet, not a mouse <p>Lifehacker had a post a couple days ago asking people about <a href="http://lifehacker.com/5054519/" rel="nofollow">the best mouse you've ever had</a> and it appears some people have traded their mouse for a tablet.</p> <p>I'm curious if anyone here has traded their mouse in f...
<p>For development, I tend to switch between the keyboard for typing and shortcuts, and the mouse for pointing at things. Given that context:</p> <p>I've heard no end of praise for this approach from everyone who's used it. They say it's easier on the wrist, it feels more natural, and once you're used to it, it's impo...
Any reason to have SQL Server 2005 and 2008 installed on same machine? <p>I'm setting up a new development server and want to install the latest version of SQL Server 2008 Express.</p> <p>Will our existing sql2005 databases work with 2008 without modification? If so is there any reason to install both versions on th...
<p>I haven't actually tried migrating a 2005 database to 2008, but generally SQL handles this cleanly and without difficulty. The simplest way to do it would be to make a backup of your database from SQL 2005 and then restore that backup with SQL 2008.</p> <p>If you want to keep the SQL 2005 copy around and online unt...
C++ versus D <p>Is the <a href="http://www.digitalmars.com/d/">D language</a> a credible alternative to Java and C++? What will it take to become a credible alternative? Should I bother learning it? Does it deserve evangelizing?</p> <p>The main reason I ask is that with the new c++ standard (c++0x) almost here, its cl...
<p>What determines the success and popularity of a programming language for real-world software development is only partially related to the quality of the language itself. As a pure language, D arguably has many advantages over C++ and Java. At the very least it is a credible alternative as a pure language, all othe...
Anyone successfully using Commission Junction API? <p>Is anyone successfully using the CJ web services? I just keep getting <code>java.lang.NullPointerException</code>s even though my app is .net (clearly their errors). CJ support doesn't even know what a web service is. I googled and found many people getting this or ...
<p>After a spending many days, this code is working for me.</p> <pre><code>$client = new SoapClient($cjCommissionUrl, array('trace' =&gt; 1, 'soap_version' =&gt; SOAP_1_1, 'style' =&gt; SOAP_DOCUMENT, 'encoding' =&gt; SOAP_LITERAL )); $date = '06/23/2010'; $results = $client-&gt;findPublishe...
Can SQLExpress 2005 and 2008 be installed on same machine without issue? <p>I would like to install SQLExpress2005 as an instance "SQLExpress" and install SQLExpresss2008 as "SQLExpress2008" instance.</p> <p>Is there any problem with doing this on the same machine?</p>
<p>As Long as you give them distinct names, there shouldn't be any problems. The binaries are stored in directories based on version, and you can (and should) point their filegroups at different locations. This should also apply to the Full versions.</p>
Search Engines Inexact Counting (about xxx results) <p>When you search in Google (i'm almost sure that Altavista did the same thing) it says "Results 1-10 of about xxxx"...</p> <p>This has always amazed me... What does it mean "about"?<br /> How can they count roughly?<br /> I do understand why they can't come up with...
<p>Most likely it's similar to the sort of estimated row counts used by most SQL systems in their query planning; a number of rows in the table (known exactly as of the last time statistics were collected, but generally not up-to-date), multiplied by an estimated selectivity (usually based on a sort of statistical dist...
Automatically adding specified text at beginning of files in VS 2008 <p>Is there a way to have Visual Studio 2008 automatically add heading information to files? For example, "Copyright 2008" or something along those lines. I've been digging through the options, but nothing seems to be jumping out at me.</p>
<p>I assume you'd like to modify the class file templates. They're in:</p> <pre><code>%ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Code\1033 </code></pre> <p><a href="http://blogs.southworks.net/jpgarcia/2008/09/01/visual-studio-2008-templates-compliant-with-microsoft-stylecop/" rel="n...
Are there any free ways to turn an html page into an image with .net <p>I want to take html, including the text and images and turn it into one image containing everything. Is there a free way to do it?</p> <p>This is using .net 3.5.</p> <h3>See also:</h3> <p><a href="http://stackoverflow.com/questions/119116/serve...
<p>You might check out <a href="http://www.codeproject.com/KB/graphics/IECapture.aspx" rel="nofollow">this project</a> or <a href="http://www.developerfusion.co.uk/show/4712/" rel="nofollow">this page</a>.</p> <p>Hope that helps.</p>
Why doesn't C++ have a garbage collector? <p>I'm not asking this question because of the merits of garbage collection first of all. My main reason for asking this is that I do know that Bjarne Stroustrup has said that C++ will have a garbage collector at some point in time.</p> <p>With that said, why hasn't it been a...
<p>To add to the debate here.</p> <p>There are known issues with garbage collection, and understanding them helps understanding why there is none in C++.</p> <p><strong>1. Performance ?</strong></p> <p>The first complaint is often about performance, but most people don't really realize what they are talking about. A...
How can I reseed an identity column in a T-SQL table variable? <p>I have a T-SQL <strong>table variable</strong> (not a table) which has an auto incrementing identity column. I want to clear all data from this variable and reset the identity column value to 1. How can this be done?</p>
<p>Truncating the table will dump ALL the data, and reset the identity seed.</p> <p>Otherwise, you can use this call to reset the identity while retaining any of the data:</p> <pre><code>DBCC CHECKIDENT (yourtableName, reseed, @NewStartSeedValue) </code></pre>
Ruby isPrime Method <pre><code>('1' * N) !~ /^1?$|^(11+?)\1+$/ </code></pre> <p>On the net, I found this piece of Ruby code that works for N >= 0 that determines whether or not N is a prime. From what I can tell, it looks like play with regex but I have no idea how it works. Could someone tell me how it works?</p>
<p>You can find a lengthy explanation of this code here: <a href="http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prime-numbers/">http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prime-numbers/</a></p>
Can I have non-measure codes mixed with measures in my fact table? <p>We're doing a complex bit of data accumulation. Our customer sends us some stuff that includes two dimensions (time and a business unit). Time is mostly year-month. The business unit dimension has just a few attributes: a name, and a few categorie...
<p>If the data is both directly related to the additive fact and is not something you want to be grouping/sorting/search on, then putting it in the fact table is okay.</p> <p>Be aware, though, that non-additive data in the fact table will either prevent roll-ups or will become a lossy operation.</p>
What is the best way to set-up authentication in a tomcat webapp? <p>I have a self built JSP webapp and at the moment I'm using tomcats built in admin pannel to manage user accounts (that are stored in tomcats config xml files) but this is limited because i can not create new accounts from within the web-app (eg. I can...
<p>Set up a <a href="http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html" rel="nofollow">database realm in Tomcat</a>, either a simple JDBC realm or a DataSource realm that will allow for connection pooling. Then adding users is a very simple CRUD web application, possibly combined with some confirmation emails.</...
Can you recommend a .cvsignore file for a Visual C#.NET solution? <p>I've developed a Visual C#.NET 2008 Express Edition solution containing three projects. I am cleaning it up to commit it into a CVS repository.</p> <p>There are several files that are created during the build process that are not necessary to be plac...
<p>Typically these are the only things that you <em>have</em> to commit:</p> <ul> <li>.sln files</li> <li>.cs files</li> <li>.csproj files</li> <li>.config files</li> <li>External DLLs and corresponding XML/config files that you are referencing</li> <li>other non-generated files that your application uses</li> </ul> ...
Is it possible to include one CSS file in another? <p>Is it possible to include one CSS file in another?</p>
<p>Yes:</p> <pre><code>@import url("base.css"); </code></pre> <p>Note:</p> <ul> <li>The <code>@import</code> rule must <a href="http://www.w3.org/TR/CSS2/cascade.html#at-import">precede</a> all other rules (except the <code>@charset</code> rule); and</li> <li>Additional <code>@import</code> statements require additi...
Real HLSL IDE/debugger <p>Are there any IDE's for developing HLSL code? The three key features I want are:<br> 1) syntax highlighting<br> 2) auto-complete<br> 3) interaction debugging</p> <p>Visual Studio doesn't do any of these things, and it doesn't seem that RenderMonkey or FX Composer do either.</p> <p>Is there ...
<p>Have you actually tried ATI's RenderMoney or NVidia's FX Composer?</p> <p>Both actually provide syntax highlighting. Futher more, NVidia's Cg toolkits actually allows you to enable syntaxhightling in Visual Studio with some custom setting.</p> <p>As for auto-completion, I don't think it's much needed as compare to...
Debug Pylons application through Eclipse <p>I have Eclipse setup with PyDev and love being able to debug my scripts/apps. I've just started playing around with Pylons and was wondering if there is a way to start up the paster server through Eclipse so I can debug my webapp?</p>
<p>Create a new launch configuration (Python Run)</p> <p><strong>Main tab</strong></p> <p>Use paster-script.py as main module (you can find it in the Scripts sub-directory in your python installation directory)</p> <p>Don't forget to add the root folder of your application in the PYTHONPATH zone</p> <p><strong>Argu...
Get list of available servers in SQL server group <p>How can I extract the list of available SQL servers in an SQL server group? I'm planning to put that list in a combo box in VB.NET.</p>
<p>The only way I knew to do it was using the command line:</p> <pre><code>osql -L </code></pre> <p>But I found the below article which seems to solve your specific goal filling a combobox:</p> <p><a href="http://www.sqldbatips.com/showarticle.asp?ID=45" rel="nofollow">http://www.sqldbatips.com/showarticle.asp?ID=45...
When using ANT, how can I define a task only if I have some specific java version? <p>I have the problem that an specific step in Ant can only be executed when we have Java 1.5 installed in the build computer. The task definition uses uses a jar file that was compiled using 1.5, so running with a 1.4 virtual machine ...
<p>The Java version is exposed via the <em>ant.java.version</em> property. Use a <em>condition</em> to set a property and execute the task only if it is true.</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;project name="project" default="default"&gt; &lt;target name="default" depends="javaCheck"...
How to check the overall health of database using Toad? <p>Anyone have any idea? And any open source sofware which also seens to perform this kind of functionality?</p>
<p>The DBA version of Toad has such a feature. In my version, it is under the DBA menu, and is called "Health Check".<br /> Screenshot <a href="http://toadsoft.com/get2know96/Web/" rel="nofollow">http://toadsoft.com/get2know96/Web/</a></p>