input stringlengths 51 42.3k | output stringlengths 18 55k |
|---|---|
Is Mono ready for prime time? <p>Has anyone used Mono, the open source .NET implementation on a large or medium sized project? I'm wondering if it's ready for real world, production environments. Is it stable, fast, compatible, ... enough to use? Does it take a lot of effort to port projects to the Mono runtime, or is ... | <p>There are a couple of scenarios to consider: (a) if you are porting an existing application and wondering if Mono is good enough for this task; (b) you are starting to write some new code, and you want to know if Mono is mature enough.</p>
<p>For the first case, you can use the <a href="http://mono-project.com/Mo... |
Best practise to authorize all users for just one page <p>What is the best way to authorize all users to one single page in a asp.net website.</p>
<p>For except the login page and one other page, I deny all users from viewing pages in the website. </p>
<p>How do you make this page accessible to all users?</p>
| <p>I've been using forms authentication and creating the necessary GenericIdentity and CustomPrincipal objects that allows me to leverage the User.IsInRole type functions you typically only get with Windows authentication.</p>
<p>That way in my web.config file, I can do stuff like...</p>
<pre><code><location path=... |
Arguments for going open source <p>I've spent my downtime at work this summer writing a framework of sorts for facilitating my day to day work. In short it loads a xml with markup that defines the blocks of the site, their content and the styling of these (very similar to html), handles the loading of assets and such.<... | <ul>
<li>Popularity</li>
<li>Community contribution</li>
<li>Public scrutiny</li>
<li>We will be forced to adhere to standards. (which will in turn make the product better)</li>
<li>Goodwill</li>
</ul>
|
Can you set, or where is, the local document root? <p>When opening a file from your hard drive into your browser, where is the document root? To illustrate, given the following HTML code, if the page is opened from the local machine(file:///) then where should the css file be for the browser to find it?</p>
<pre><cod... | <p>You <i>can</i>, but probably don't want to, set the document root on a per-file basis in the head of your file:</p>
<pre>
<base href="my-root">
</pre>
|
How to check set of files conform to a naming scheme <p>I have a bunch of files (TV episodes, although that is fairly arbitrary) that I want to check match a specific naming/organisation scheme..</p>
<p>Currently: I have three arrays of regex, one for valid filenames, one for files missing an episode name, and one for... | <blockquote>
<p>I want to add a rule that checks for
the presence of a folder.jpg file in
each directory, but to add this would
make the code substantially more messy
in it's current state..</p>
</blockquote>
<p>This doesn't look bad. In fact your current code does it very nicely, and Sven mentioned a good ... |
Code to ask yes/no question in javascript <p>I could only find the function <code>confirm()</code> that gives OK/Cancel buttons. Is there any way to give Yes/No buttons?</p>
| <p>Javascript offers 3 modal boxes. Prompt, confirm and alert. None of those satisfy your request. </p>
<p>There are a plethora of js modal popup solutions. Here's an example.</p>
<ul>
<li><a href="http://www.wildbit.com/labs/modalbox/">ModalBox</a></li>
</ul>
|
Display rows in multiple columns in Asp.net Gridview <p>By default each row of a Gridview maps to each row in a datatable or dataset attached to its datasource. But what if I want to display these rows in multiple columns. For example if it has 10 rows, 5 rows each should be displayed in 2 columns side by side. Also ca... | <p>You can use a <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.aspx"><code>DataList</code></a> control instead. It has a <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.repeatcolumns.aspx"><code>RepeatColumns</code></a> property that you can defi... |
Best way to keep an ordered list of windows (from most-recently created to oldest)? <p>What is the best way to manage a list of windows (keeping them in order) to be able to promote the next window to the top-level when the current top-level window is closed.<br>
This is for a web application, so we're using jQuery Jav... | <p>I don't really know javascript, but couldn't you create a stack of windows?</p>
|
What are the most important things to learn about .net as a Project Manager? <p>Thinking about getting into .net technology project management</p>
<p>I've had plenty of experience with PHP projects: I'm aware of most of the existing frameworks and libraries, and I've written specs and case studies based on this knowle... | <p>The number one rule is do NOT just ask for status updates. It is Especially <strong>annoying</strong> when phrases like "where are we on this?" are used. If you aren't directly involved in the details then just make sure you have established communication times or plans so that you know whats going on rather than... |
Any ReSharper equivalent for Xcode? <p>I'm a complete Xcode/Objective-C/Cocoa newbie but I'm learning fast and really starting to enjoy getting to grips with a new language, platform and paradigm.</p>
<p>One thing is though, having been using Visual Studio with R# for so long I've kind of been spoiled with the coding ... | <p>You sound as if you're looking for three major things: code templates, refactoring tools, and auto-completion.</p>
<p>The good news is that Xcode 3 and later come with superb auto-completion and template support. By default, you have to explicitly request completion by hitting the escape key. (This actually works... |
Cleaning up RTF text <p>I'd like to take some RTF input and clean it to remove all RTF formatting except \ul \b \i to paste it into Word with minor format information.</p>
<p>The command used to paste into Word will be something like:
oWord.ActiveDocument.ActiveWindow.Selection.PasteAndFormat(0) (with some RTF text al... | <p>I would use a hidden RichTextBox, set the Rtf member, then retrieve the Text member to sanitize the RTF in a well-supported way. Then I would use manually inject the desired formatting afterwards.</p>
|
Executing JavaScript from Flex: Is this javascript function dangerous? <p>I have a flex application that needs the ability to generate and execute JavaScript. When I say this, I mean I need to execute raw JavaScript that I create in my Flex application (not just an existing JavaScript method)</p>
<p>I am currently doi... | <p>There's no need for the JavaScript function, the first argument to <code>ExternalInterface</code> can be any JavaScript code, it doesn't have to be a function name (the documentation says so, but it is wrong).</p>
<p>Try this:</p>
<pre><code>ExternalInterface.call("alert('hello')");
</code></pre>
|
SQL Server - Dirty Reads Pros & Cons <p>Why should I or shouldn't I use dirty reads:</p>
<pre><code>set transaction isolation level read uncommitted
</code></pre>
<p>in SQL Server?</p>
| <p>From <a href="http://msdn.microsoft.com/en-us/library/aa259216(SQL.80).aspx">MSDN</a>:</p>
<blockquote>
<p>When this option is set, it is possible to read uncommitted or dirty data; values in the data can be changed and rows can appear or disappear in the data set before the end of the transaction. </p>
</blockqu... |
How to stop NTFS volume auto-mounting on OS X? <p>I'm a bit newbieish when it comes to the deeper parts of OSX configuration and am having to put up with a fairly irritating niggle which while I can put up with it, I know under Windows I could have sorted in minutes.</p>
<p>Basically, I have an external disk with two ... | <p>The following entry in <code>/etc/fstab</code> will do what you want, even on 10.5 (Leopard):</p>
<pre><code>LABEL=VolumeName none ntfs noauto
</code></pre>
<p>If the file is not already there, just create it. Do not use <code>/etc/fstab.hd</code>! No reloading of <code>diskarbitrationd</code> needed.</p>
... |
Java JPanel redraw issues <p>I have a Java swing application with a panel that contains three JComboBoxes that do not draw properly.<br>
The combox boxes just show up as the down arrow on the right side, but without the label of the currently selected value.<br>
The boxes will redraw correctly if the window is resized ... | <p>Can you give us some more information on how you add the combo boxes to the JPanel? This is a pretty common thing to do in Swing so I doubt that it's a JVM issue but I guess anything is possible.</p>
<p>Specifically, I would double check to make sure you're not accessing the GUI from any background threads. In th... |
Silverlight vs Flex <p>My company develops several types of applications. A lot of our business comes from doing multimedia-type apps, typically done in Flash. However, now that side of the house is starting to migrate towards doing Flex development.</p>
<p>Most of our other development is done using .NET. I'm tryi... | <p>I think you should look at Silverlight as a long-term play, just as Microsoft seems to be doing. There's an obvious balance on when to use Silverlight vs. Flash when you're concerned about reach and install base, but here are some reasons Silverlight is a good direction to move in:</p>
<ol>
<li><p>Second mover adva... |
Is there any way to configure windows to not change the focus? <p>I'm tired of being in the middle of typing something, having a pop-up with a question appear, and hitting enter before reading it... (it also happens with some windows that are not pop-ups)</p>
<p>Do you know if there's some setting I could touch for th... | <p>Not that I know of. This has been a plague of Windows versions for quite some time.</p>
|
Am I missing something about LINQ? <p>I seem to be missing something about LINQ. To me, it looks like it's taking some of the elements of SQL that I like the least and moving them into the C# language and using them for other things.</p>
<p>I mean, I could see the benefit of using SQL-like statements on things other ... | <p>LINQ is not about SQL. LINQ is about being apply functional programming paradigmns on objects.</p>
<p>LINQ to SQL is an ORM built ontop of the LINQ foundation, but LINQ is much more. I don't use LINQ to SQL, yet I use LINQ all the time.</p>
<p>Take the task of finding the intersection of two lists:</p>
<p>Before ... |
Does Hostmonster support Django <p>I know Hostmonster allows Python. Has anyone successfully run Django on there? Any problems? </p>
| <p>I know this is an old question, but here is the answer: <strong>yes, Hostmonster does support Django</strong></p>
<p>There used to be <a href="http://helpdesk.hostmonster.com/index.php/kb/article/000531" rel="nofollow">this Hostmonster KB article</a> for details, including instructions on how to set it up, but that... |
How to enable multisampling for a wxWidgets OpenGL program? <p><strong><a href="http://en.wikipedia.org/wiki/Multisample_anti-aliasing" rel="nofollow">Multisampling</a></strong> is a way of applying <strong>full screen anti-aliasing</strong> (FSAA) in 3D applications. I need to use multisampling in my OpenGL program, w... | <p>I finally got Multisampling working with my wxWidgets OpenGL program. It's a bit messy right now, but here's how:</p>
<p><strong>wxWidgets</strong> doesn't have <strong>Multisampling</strong> support in their <strong>stable releases</strong> right now (latest version at this time is <strong>2.8.8</strong>). But, it... |
.NET - Get protocol, host, and port <p>Is there a simple way in <em>.NET</em> to quickly get the current protocol, host, and port? For example, if I'm on the following URL:</p>
<p><code>http://www.mywebsite.com:80/pages/page1.aspx</code></p>
<p>I need to return:</p>
<p><code>http://www.mywebsite.com:80</code></p>
<... | <p>Even though @Rick has the accepted answer for this question, there's actually a shorter way to do this, using the poorly named <code>Uri.GetLeftPart()</code> method.</p>
<pre><code>Uri url = new Uri("http://www.mywebsite.com:80/pages/page1.aspx");
string output = url.GetLeftPart(UriPartial.Authority);
</code></pre>... |
PostgreSQL: GIN or GiST indexes? <p>From what information I could find, they both solve the same problems - more esoteric operations like array containment and intersection (&&, @>, <@, etc). However I would be interested in advice about when to use one or the other (or neither possibly).<br>
The <a href="ht... | <p>First of all, do you need to use them for text search indexing? GIN and GiST are index specialized for some data types. If you need to index simple char or integer values then the normal B-Tree index is the best.<br />
Anyway, PostgreSQL documentation has a chapter on <a href="http://www.postgresql.org/docs/8.3/stat... |
System.Web.Caching vs. Enterprise Library Caching Block <p>For a .NET component that will be used in both web applications and rich client applications, there seem to be two obvious options for caching: System.Web.Caching or the Ent. Lib. Caching Block.</p>
<ul>
<li>What do you use?</li>
<li>Why?</li>
</ul>
<h2><a hr... | <p>These are the items that I consider for the topic of Caching:</p>
<p>MemCached Win32
Velocity
.net Cache
Enterprise Library Caching Application Block</p>
<p><strong>MemCached Win32:</strong> Up until recently I have used MemCached Win32. This is a akin to a web farm (many servers serving the same content for high... |
Table cells larger than they are meant to be <p>I've created a map system for a game that runs on the principle of drawing the picture of the map from tiles. There are many reasons for this which I won't go into here but if you really want to know then I'm sure you can find out how to contact me ;)</p>
<p>I have <a hr... | <p>I think you need to use <code>display: block</code> on your images. When images are <code>inline</code> there's a little extra space for the line spacing.</p>
|
Can you compile Apache HTTP Server and redeploy its binaries to a different location? <p>As part of our product release we ship Apache HTTP Server binaries that we have compiled on our (UNIX) development machine.</p>
<p>We tell our clients to install the binaries (on their UNIX servers) under the same directory struct... | <p>I think the way to do(get around) this problem is to develop a "./configure && make" script that your client uses to install, specify and compile the binaries. That would offcourse require that the client has all the source-code installed on his server or you can make it available on an NFS share.</p>
|
WCF push to client through firewall? <blockquote>
<p>See also <a href="http://stackoverflow.com/questions/1700917/how-does-a-wcf-server-inform-a-wcf-client-about-changes-better-solution-then-si">How does a WCF server inform
a WCF client about changes? (Better
solution then simple polling, e.g.
Coment or long po... | <p>I've found a couple of solutions:</p>
<p><a href="http://www.zeroc.com/" rel="nofollow" title="ZeroC Ice">ZeroC Ice</a> GPL with a commercial option. Have only tested quickly. Looks more powerful than .NET Remoting and is very actively developed.</p>
<p><a href="http://www.remobjectssdk.com/" rel="nofollow" title=... |
What are the major differences between ANSI C and K&R C? <p>The <a href="http://en.wikipedia.org/wiki/ANSI_C">Wikipedia article on ANSI C</a> says:</p>
<blockquote>
<p>One of the aims of the ANSI C standardization process was to produce a superset of K&R C (the first published standard), incorporating many of th... | <p>There may be some confusion here about what "K&R C" is. The term refers to the language as documented in the first edition of "The C Programming Language." Roughly speaking: the input language of the Bell Labs C compiler circa 1978.</p>
<p>Kernighan and Ritchie were involved in the ANSI standardization process.... |
What's a good way to check if two datetimes are on the same calendar day in TSQL? <p>Here is the issue I am having: I have a large query that needs to compare datetimes in the where clause to see if two dates are on the same day. My current solution, which sucks, is to send the datetimes into a UDF to convert them to ... | <p>This is much more concise:</p>
<pre><code>where
datediff(day, date1, date2) = 0
</code></pre>
|
How do I cluster an upload folder with ASP.Net? <p>We have a situation where users are allowed to upload content, and then separately make some changes, then submit a form based on those changes.</p>
<p>This works fine in a single-server, non-failover environment, however we would like some sort of solution for sharin... | <p>In our scenario, we have a separate file server that both of our front end app servers write to, that way you either server has access to the same sets of files.</p>
|
Configure a Java Socket to fail-fast on disconnect? <p>I have a listening port on my server that I'm connecting to using a Java class and the <code>Socket</code> interface, i.e.</p>
<pre><code>Socket mySocket = new Socket(host,port);
</code></pre>
<p>I then grab an <code>OutputStream</code>, decorate with a <code>Pri... | <p>Set a short timeout?</p>
<p>Does <code>isOutputShutdown()</code> not get you what you want?</p>
<p>You could always build a <code>SocketWatcher</code> class that spins up in its own <code>Thread</code> and repeatedly tries to write empty strings to the <code>Socket</code> until that raises a <code>SocketClosedExce... |
What is the best way to prevent session hijacking? <p>Specifically this is regarding when using a client session cookie to identify a session on the server.</p>
<p>Is the best answer to use SSL/HTTPS encryption for the entire web site, and you have the best guarantee that no man in the middle attacks will be able to s... | <p>Encrypting the session value will have zero effect. The session cookie is already an arbitrary value, encrypting it will just generate another arbitrary value that can be sniffed.</p>
<p>The only real solution is HTTPS. If you don't want to do SSL on your whole site (maybe you have performance concerns), you might ... |
Acts-as-readable Rails plugin Issue <p>I'm using Intridea's <a href="http://www.intridea.com/2008/2/29/acts-as-readable-drop-in-mark-as-read-functionality">Acts as Readable</a> Rails plugin for a messaging system I'm currently building.
I've defined my message class accordingly:</p>
<pre><code>class Post < ActiveRe... | <p>The following will work</p>
<pre><code><%= Post.find_unread_by(current_user).size %>
</code></pre>
<p>or</p>
<pre><code><%= Post.find_unread_by(current_user).length %>
</code></pre>
<p>However if you check your development.log you should see that it gets the unread count by </p>
<ol>
<li>Retrieving ... |
How Does One Sum Dimensions of an Array Specified at Run-Time? <p>I am working on a function to establish the entropy of a distribution. It uses a copula, if any are familiar with that. I need to sum up the values in the array based on which dimensions are "cared about."</p>
<p>Example: Consider the following examp... | <p>@Jeff</p>
<p>I actually think this is an interesting question. I'm not sure how useful it is, but it is a valid question.</p>
<p>@Ed</p>
<p>Can you provide a little more info on this question? You said the dimension of the array is dynamic, but is the number of elements dynamic as well?</p>
<p>EDIT: I'm going to... |
When do you use the "this" keyword? <p>I was curious about how other people use the <strong>this</strong> keyword. I tend to use it in constructors, but I may also use it throughout the class in other methods. Some examples:</p>
<p>In a constructor:</p>
<pre><code>public Light(Vector v)
{
this.dir = new Vector(v)... | <p>I don't mean this to sound snarky, but it doesn't matter.</p>
<p>Seriously.</p>
<p>Look at the things that are important: your project, your code, your job, your personal life. None of them are going to have their success rest on whether or not you use the "this" keyword to qualify access to fields. The this keywo... |
How IE7 determines a site's Security Zone <p>Does anyone know how IE7 determines what Security Zone to use for a site? I see the basics for IE6 <a href="http://www.microsoft.com/technet/prodtechnol/ie/reskit/6/default.mspx?mfr=true" rel="nofollow">here</a>, but I can't find the equivalent for IE7.</p>
| <p>I could use a little more information to narrow down my answer, but here is what I have:</p>
<p>Internet Explorer has 5 different security zones be default: Local Machine Zone, Intranet, Internet, Trusted, and Restricted
These are determined in urlmon.dll (Url Moniker)
More information here: <a href="http://msdn.mi... |
Source Control Beginners <p>What would be the best version control system to learn as a beginner to source control?</p>
| <p>Anything but Visual Source Safe; preferably one which supports the concepts of branching and merging. As others have said, Subversion is a great choice, especially with the TortoiseSVN client.</p>
<p>Be sure to check out (pardon the pun) <a href="http://www.ericsink.com/scm/source_control.html">Eric Sink's classic ... |
Notification of drop in drag-drop in Windows <p>My C# program has a list of files that can be dragged from it and dropped into another program. My requirements are that the file be copied to a different directory first.</p>
<p>So, can I be notified of the drop operation so that I can only copy the file if operation su... | <p>There are a few ambiguities in your question. What operation needs to be successful?</p>
<p>For everything you want to know about drag and drop, browse through these search results (multiple pages worth):</p>
<p><a href="http://www.google.com/search?q=drag+drop+site%3Ablogs.msdn.com%2Foldnewthing&rls=com.micro... |
What is your best list of 'must have' development tools? <p>I recently burned up my development laptop (it literally emitted smoke from the vents). After pulling the hd I was unable to get it to spin with a USB device attached to a home tower. Since I was on a deadline I had to rush and buy a new laptop (Turion 64 x2) ... | <p>Let me be general [then specific]:</p>
<ol>
<li>Your IDE of choice [<a href="http://www.microsoft.com/Express/">VS 2008</a> here]</li>
<li>Your debugger [It is usually part of your IDE, but sometimes <a href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx">WinDbg</a> is needed]</li>
<li>Its plugins f... |
Windows / Active Directory - User / Groups <p>I'm looking for a way to find a the windows login associated with a specific group. I'm trying to add permissions to a tool that only allows names formatted like:</p>
<pre><code>DOMAIN\USER
DOMAIN\GROUP
</code></pre>
<p>I have a list of users in active directory format t... | <p>Programatically or Manually?</p>
<p>Manually, i prefer <a href="http://technet.microsoft.com/en-us/sysinternals/bb963907.aspx" rel="nofollow">AdExplorer</a>, which is a nice Active directory Browser. You just connect to your domain controller and then you can look for the user and see all the details. Of course, yo... |
What Javascript rich text editor will not break the browser's spellcheck? <p>I'm using TinyMCE in an ASP.Net project, and I need a spell check. The only TinyMCE plugins I've found use PHP on the server side, and I guess I could just break down and install PHP on my server and do that, but quite frankly, what a pain. I ... | <p>TinyMCE only goes out of its way to disable spell-checking when you don't specify the <code>gecko_spellcheck</code> option (i verified this with their example code). Might want to double-check your <code>tinyMCE.init()</code> call - it should look something like this:</p>
<pre><code>tinyMCE.init({
mode : "textarea... |
Free or Open Source Collaboration/eLearning Software <p>I am looking for open source or free data collaboration software. Specifically this is for a non-profit organization that wants to teach remote students how a foreign language. The idea is that an instructor would teach a class and there would be up to 10 student... | <p>I know a few of the developers on the Carleton University developed <a href="http://code.google.com/p/blindside/" rel="nofollow">Blindside Project</a>. They are actively developing an open-source web conferencing and presentation tool for e-learning, with the intent of eventually offering university courses online.... |
Good strategy for leaving an audit trail/change history for DB applications? <p>What are some strategies that people have had success with for maintaining a change history for data in a fairly complex database. One of the applications that I frequently use and develop for could really benefit from a more comprehensive ... | <p>One strategy you could use is MVCC, Multi-Value Concurrency Control. In this scheme, you never do updates to any of your tables, you just do inserts, maintaining version numbers for each record. This has the advantage of providing an exact snapshot from any point in time, and it also completely sidesteps the updat... |
Factorial Algorithms in different languages <p>I want to see all the different ways you can come up with, for a factorial subroutine, or program. The hope is that anyone can come here and see if they might want to learn a new language.</p>
<h2>Ideas:</h2>
<ul>
<li>Procedural</li>
<li>Functional</li>
<li>Object Orient... | <h1>Polyglot: 5 languages, all using bignums</h1>
<p>So, I wrote a polyglot which works in the three languages I often write in, as well as one from my other answer to this question and one I just learned today. It's a standalone program, which reads a single line containing a nonnegative integer and prints a single ... |
Best method to get objects from a BlockingQueue in a concurrent program? <p>What is the best method to get objects out of a BlockingQueue, in a concurrent program, without hitting a race condition? I'm currently doing the following and I'm not convinced it is the best method:</p>
<pre><code>BlockingQueue<Violation... | <pre><code>class Producer implements Runnable {
private final BlockingQueue queue;
Producer(BlockingQueue q) { queue = q; }
public void run() {
try {
while (true) { queue.put(produce()); }
} catch (InterruptedException ex) { ... handle ...}
}
Object produce() { ... }
}
class Consumer ... |
How do I marshal a lambda (Proc) in Ruby? <p>Joe Van Dyk <a href="http://www.zenspider.com/pipermail/ruby/2008-August/004223.html">asked the Ruby mailing list</a>:</p>
<blockquote>
<p>Hi,</p>
<p>In Ruby, I guess you can't marshal a lambda/proc object, right? Is
that possible in lisp or other languages?</p>
... | <p>You cannot marshal a Lambda or Proc. This is because both of them are considered closures, which means they close around the memory on which they were defined and can reference it. (In order to marshal them you'd have to Marshal all of the memory they could access at the time they were created.)</p>
<p>As Gaius poi... |
Is there a site for detailed unit testing samples? <p>Is there a site for unit testing as <a href="http://refactormycode.com/" rel="nofollow">RefactorMyCode</a> for refactoring? I think it would be a great help for beginners like me.</p>
| <p>So far, from what I have seen, RMC seems to be one-of-a-kind, which is both cool, but sad :(</p>
<p>It seems pretty inactive, but I have posted a couple of questions on there, and amazed at the response (a lot of people just have the RSS feed and wait for something to happen). So I would definately recommend just g... |
Classes vs 2D arrays <p>Which is better to use in PHP, a 2D array or a class? I've included an example of what I mean by this.</p>
<pre><code>// Using a class
class someClass
{
public $name;
public $height;
public $weight;
function __construct($name, $height, $weight)
{
$this -> name... | <p>The "class" that you've constructed above is what most people would use a <em>struct</em> for in other languages. I'm not sure what the performance implications are in PHP, though I suspect instantiating the objects is probably more costly here, if only by a little bit.</p>
<p>That being said, if the cost is relati... |
What's the fastest way to bulk insert a lot of data in SQL Server (C# client) <p>I am hitting some performance bottlenecks with my C# client inserting bulk data into a SQL Server 2005 database and I'm looking for ways in which to speed up the process.</p>
<p>I am already using the SqlClient.SqlBulkCopy (which is based... | <p>You're already using <a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx">SqlBulkCopy</a>, which is a good start.</p>
<p>However, just using the SqlBulkCopy class does not necessarily mean that SQL will perform a bulk copy. In particular, there are a few requirements that must be... |
What's the point of OOP? <p>As far as I can tell, in spite of the countless millions or billions spent on OOP education, languages, and tools, OOP has not improved developer productivity or software reliability, nor has it reduced development costs. Few people use OOP in any rigorous sense (few people adhere to or unde... | <blockquote>
<p>The real world isn't "OO", and the idea implicit in OO--that we can model things with some class taxonomy--seems to me very fundamentally flawed</p>
</blockquote>
<p>While this is true and has been observed by other people (take Stepanov, inventor of the STL), the rest is nonsense. OOP may be flawed ... |
Programming a simple IRC (Internet-Relay-Chat) Client <p>I started using IRC at a young age, and I have always been fascinated with it. As a language exercise, I was thinking about programming a simple IRC client in Ruby with <a href="http://www.shoooes.net/">Shoes</a> as a graphical front-end. My question to you, ki... | <p>An earlier post mentioned RFC1459. While it is a very good introduction to IRC, it has actually been superseded by RFCs 2810-2813. Here is a more complete list of documentation you need to program anything IRC-related:</p>
<ul>
<li><a href="http://tools.ietf.org/html/rfc1459">RFC1459</a> (original RFC; superseded, ... |
What are the best MVC web frameworks on the market? <p>I am looking for a Web Framework to move windows based applications to the web.</p>
<p>The main requirements to WF are the following:</p>
<ol>
<li>unit tests support</li>
<li>desktop and mobile browsers support</li>
<li>long term viability</li>
<li>maturity of th... | <p>In my opinion, with contributions from the SO community</p>
<ul>
<li><a href="http://zendframework.com/">Zend Fraemwork</a> for PHP</li>
<li><a href="http://www.djangoproject.com/">Django</a> for Python</li>
<li><a href="http://rubyonrails.org">Rails</a> for Ruby</li>
<li><a href="http://merbivore.com/">Merb</a> fo... |
SQL Server: Examples of PIVOTing String data <p>Trying to find some simple SQL Server PIVOT examples. Most of the examples that I have found involve counting or summing up numbers. I just want to pivot some string data. For example, I have a query returning the following.</p>
<pre><code>Action1 VIEW
Action1 EDIT ... | <p>Remember that the MAX aggregate function will work on text as well as numbers. This query will only require the table to be scanned once.</p>
<pre><code>SELECT Action,
MAX( CASE data WHEN 'View' THEN data ELSE '' END ) ViewCol,
MAX( CASE data WHEN 'Edit' THEN data ELSE '' END ) EditCol
FROM t
GROU... |
How do you automate a Visual Studio build? <p>How do you turn a Visual Studio build that you'd perform in the IDE into a script that you can run from the command line?</p>
| <p>With VS2008 you can do this:</p>
<pre><code>devenv solution.sln /build configuration
</code></pre>
|
Vi editing for Visual Studio <p>I'm used to the Vi(m) editor and am using MS Visual Studio 2005 at work. I couldn't find a free Vi add-in (there's only one for the 2003 version). I googled a bit, saw that there was a 'Google summer of code' project this year to write such an add-in, and am eagerly awaiting the result. ... | <p>ViEmu works great with Visual Studio. I used Vi(m) strictly in Linux, but I was turned on to bringing the Vi(m) editing process into the Windows world by <a href="http://www.jpboodhoo.com/">JP Boodhoo</a>. JP <a href="http://blog.jpboodhoo.com/HookedOnVIM.aspx">praises</a> about it also.</p>
|
Why should you prevent a class from being subclassed? <p>What can be reasons to prevent a class from being inherited? (e.g. using sealed on a c# class)
Right now I can't think of any.</p>
| <p>Because writing classes to be substitutably extended is <em>damn hard</em> and requires you to make accurate predictions of how future users will want to extend what you've written.</p>
<p>Sealing your class forces them to use composition, which is much more robust.</p>
|
Using Subversion with Visual Basic 6 <p>My team is moving from Visual SourceSafe to Subversion soon, while developing/supporting a legacy project in Visual Basic 6.0, so I have a couple of questions:</p>
<ul>
<li>What's the best tool for Subversion IDE integration in Visual Studio 6? (or is it not worth the trouble...... | <p>I would agree that Tortoise SVN in Windows Explorer would be the best way to use SVN with VB6.</p>
<p>The biggest change you will find migrating to SVN is the idea of "Check out" and "Check in" aren't exactly the same as "Update" and "Commit". . . thus, any IDE integration with VB6 is limited because VB6 supports M... |
What is this 'Multiple-step OLE DB' error? <p>I'm doing a little bit of work on a horrid piece of software built by Bangalores best.</p>
<p>It's written in mostly classic ASP/VbScript, but "ported" to ASP.NET, though most of the code is classic ASP style in the ASPX pages :(</p>
<p>I'm getting this message when it tr... | <p>I ran into this a long time ago with working in ASP. I found this knowledge base article and it helped me out. I hope it solves your problem.</p>
<p><a href="http://support.microsoft.com/kb/269495" rel="nofollow"><a href="http://support.microsoft.com/kb/269495" rel="nofollow">http://support.microsoft.com/kb/26949... |
C#.NET Winforms: Is it possible to override Label.Autosize? <p>I don't like the AutoSize property of the Label control. I have a custom Label that draws a fancy rounded border among other things. I'm placing a <code>AutoSize = false</code> in my constructor, however, when I place it in design mode, the property always ... | <p>I've seen similar behaviour when setting certain properties of controls in the constructor of the form itself. They seem to revert back to their design-time defaults.</p>
<p>I notice you're already overriding the OnLoad method. Have you tried setting AutoSize = false there? Or are you mainly concerned with providin... |
Inserting at the very end in FCKeditor <p>FCKeditor has InsertHtml API (<a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API" rel="nofollow">JavaScript API document</a>) that inserts HTML in the current cursor position. How do I insert at the very end of the document?</p>
<p>Do I need to st... | <p>It looks like you could use a combination of GetHTML and SetHTML to get the current contents, append your html and reinsert everything into the editor. Although it does say </p>
<blockquote>
<p>Note that when using this method, you will lose any listener that you may have previously registered on the editor.Edito... |
Abstraction away from CSS <p>Let me make something quite clear.</p>
<p>I. <strong>Hate</strong>. CSS.</p>
<p>It is a never-ending nightmare. Every minor layout change feels like a hack. Solutions to problems seem to often involve jiggering numbers around like some chef trying to work out exactly how much nutmeg to pu... | <p>What I found works best is to really learn CSS. I mean <strong>really</strong> learn CSS.</p>
<p>It can be a confusing language to learn, but if you read enough about it and practice, eventually you'll learn the best way to do things.</p>
<p>The key is to do it enough that it comes natural. CSS can be very elegant... |
Asynchronous Stored Procedure Calls <p>Is it possible to call a stored prodcedure from another stored procedure asynchronously?</p>
<p><strong>Edit:</strong> Specifically I'm working with a DB2 database.</p>
| <p>Executive summary: Yes, if your database has a message queue service.</p>
<p>You can push a message onto a queue and the queue processor will consume it asynchronously.</p>
<ul>
<li>Oracle: queues</li>
<li>Sql Server: service broker</li>
<li>DB2: event broker</li>
</ul>
<p>For "pure" stored procedure languages (... |
Best Method to run a Java Application as a *nix Daemon or Windows Service? <p>I am looking for the best method to run a Java Application as a *NIX daemon or a Windows Service. I've looked in to the <a href="http://wrapper.tanukisoftware.org/">Java Service Wrapper</a>, the <a href="http://commons.apache.org/daemon/jsvc... | <p>I've had great success with Java Service Wrapper myself. I haven't looked at the others, but the major strengths of ServiceWrapper are:</p>
<ul>
<li>Great x-platform support - I've used it on Windows and Linux, and found it easy on both</li>
<li>Solid Documentation - The docs are clear and to the point, with great... |
What's the best way to import/read data from pdf files? <p>We get a large amount of data from our clients in pdf files in varying formats [layout-wise], these files are typically report output, and are typically properly annotated [they don't usually need OCR], but not formatted well enough that simply copying several ... | <p>We use <a href="http://www.foolabs.com/xpdf/about.html" rel="nofollow">Xpdf</a> in one of our applications. Its a c++ library which is primarily used for pdf rendering, although it does have a text extractor which could be useful for this project.</p>
|
What is the best free memory leak detector for a C/C++ program and its plug-in DLLs? <p>I have a .exe and many plug-in .dll modules that the .exe loads. (I have source for both.) A cross-platform (with source) solution would be ideal, but the platform can be narrowed to WinXP and Visual Studio (7.1/2003 in my case).</p... | <p>I personally use <a href="http://vld.codeplex.com">Visual Leak Detector</a>, though it can cause large delays when large blocks are leaked (it displays the contents of the entire leaked block).</p>
|
Ruby Performance <p>I'm pretty keen to develop my first Ruby app, as my company has finally blessed its use internally.</p>
<p>In everything I've read about Ruby up to v1.8, there is never anything positive said about performance, but I've found nothing about version 1.9. The last figures I saw about 1.8 had it drasti... | <p>There are some benchmarks of 1.8 vs 1.9 at <a href="http://www.rubychan.de/share/yarv_speedups.html" rel="nofollow">http://www.rubychan.de/share/yarv_speedups.html</a>. Overall, it looks like 1.9 is a lot faster in most cases.</p>
|
What is the best way to connect and use a sqlite database from C# <p>I've done this before in C++ by including sqlite.h but is there a similarly easy way in C#?</p>
| <p>I'm with, Bruce. I AM using <a href="http://system.data.sqlite.org/">http://system.data.sqlite.org/</a> with great success as well. Here's a simple class example that I created:</p>
<pre><code>using System;
using System.Text;
using System.Data;
using System.Data.SQLite;
namespace MySqlLite
{
class DataClas... |
Revoke shared folders in windows <p>Over the last few months/years, I have shared a folder or two with numerous people on my domain. How do I easily revoke those shares to keep access to my system nice and tidy?</p>
| <p>Using computer management (an MMC snap-in. See Control Panel Administrative tools) you can see a list of all folders that are shared. You could delete the shares or change the permissions on the share to only allow access for certain people or groups.</p>
|
Asp.net website first start is very slow <p>The first time I load the website in the production web server, it start very slow, subsequent pages load very quickly (included the home page).</p>
<p>I precompiled the site, but nothing changes. </p>
<p>I don't have any code at Application start.
I don't have cached items... | <p>It's just your app domain loading up and loading any binaries into memory. Also, it's initializing static variables, so if you have a static variable that loads up a lot of data from the db, it might take a bit.</p>
|
Hibernate saveOrUpdate with another object in the session <p>Is there any way to save an object using Hibernate if there is already an object using that identifier loaded into the session?</p>
<ul>
<li>Doing session.contains(obj) seems to only return true if the session contains that exact object, not another object w... | <p>Have you tried calling .SaveOrUpdateCopy()?
It should work in all instances, if there is an entity by the same id in the session or if there is no entity at all. This is basically the catch-all method, as it converts a transient object into a persistent one (Save), updates the object if it is existing (Update) or e... |
sizeof() equivalent for reference types? <p>I'm looking for a way to get the size of an instance of a reference type. sizeof is only for value types. Is this possible?</p>
| <p>You need <a href="http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal.sizeof.aspx">Marshal.SizeOf</a></p>
<p><strong>Edit:</strong> This <em>is</em> for unsafe code, but then, so is sizeof().</p>
|
How to set encoding in .getJSON JQuery <p>In my web app, I submit some form fields with jQuery <code>$.getJSON()</code> Method. I am having some problems with the encoding. The character-set of my app is <code>charset=ISO-8859-1</code> but I think these fields are submitted with <code>UTF-8</code>. </p>
<p>Does anyone... | <p>If you want to use <code>$.getJSON()</code> you can add the following before the call :</p>
<pre><code>$.ajaxSetup({
scriptCharset: "utf-8",
contentType: "application/json; charset=utf-8"
});
</code></pre>
<p>You can use the charset you want instead of <code>utf-8</code>.</p>
<p>The options are explained ... |
Why is my PDF footer text invisible? <p>I'm creating PDFs on-demand with ColdFusion's <a href="http://cfquickdocs.com/cf8/?getDoc=cfdocument" rel="nofollow">CFDocument</a> tag, like so:</p>
<pre><code><cfdocument format="PDF" filename="#attributes.fileName#" overwrite="true">
<cfdocumentitem type="footer"... | <p>A PDF is what I'm after, so I'm not sure how outputting another format would help.</p>
<p>As it turns out, the footer space just wasn't enough to fit all of this text; verified by the fact that changing the font size to 4pt would fit it all in without a problem.</p>
<p>I spent some time attempting to rewrite the f... |
Parse string to TimeSpan <p>I have some strings of xxh:yym format where xx is hours and yy is minutes like "05h:30m". What is an elegant way to convert a string of this type to TimeSpan?</p>
| <p>This seems to work, though it is a bit hackish:</p>
<pre><code>TimeSpan span;
if (TimeSpan.TryParse("05h:30m".Replace("m","").Replace("h",""), out span))
MessageBox.Show(span.ToString());
</code></pre>
|
XPath and Selecting a single node <p>I'm using XPath in .NET to parse an XML document, along the lines of:</p>
<pre class="lang-cs prettyprint-override"><code>XmlNodeList lotsOStuff = doc.SelectNodes("//stuff");
foreach (XmlNode stuff in lotsOStuff)
{
XmlNode stuffChild = stuff.SelectSingleNode("//stuffChild");
... | <p><code>//</code> at the beginning of an XPath expression starts from the document root. Try ".//stuffChild". . is shorthand for self::node(), which will set the context for the search, and // is shorthand for the descendant axis.</p>
<p>So you have:</p>
<pre><code>XmlNode stuffChild = stuff.SelectSingleNode(".//s... |
Limitations of screen readers <p>I'm a web developer, and I want to make the web sites I develop more accessible to those using screen readers. What limitations do screen readers have that I should be most aware of, and what can I do to avoid hitting these limitations.</p>
<p>This question was sparked by reading anot... | <blockquote>
<p>Are screen readers really so primitive that they would read text that isn't even displayed on the screen?</p>
</blockquote>
<p>What you have to remember is that any HTML parser doesn't read the screen - it reads the source markup. Whta you see on the screen is the browser's attempt to apply CSS to th... |
Alternating coloring groups of rows in Excel <p>I have an Excel Spreadsheet like this</p>
<pre>
id | data for id
| more data for id
id | data for id
id | data for id
| more data for id
| even more data for id
id | data for id
| more data for id
id | data for id
id | data for id
| more data for id
</pre>... | <p>I use this formula to get the input for a conditional formatting:</p>
<pre><code>=IF(B2=B1,E1,MOD(E1+1,2)) [content of cell E2]
</code></pre>
<p>Where column B contains the item that needs to be grouped and E is an auxiliary column. Every time that the upper cell (B1 on this case) is the same as the current one... |
Comparing Arrays of Objects in JavaScript <p>I want to compare 2 arrays of objects in JavaScript code. The objects have 8 total properties, but each object will not have a value for each, and the arrays are never going to be any larger than 8 items each, so maybe the brute force method of traversing each and then look... | <p>EDIT: You cannot overload operators in current, common browser-based implementations of JavaScript interpreters.</p>
<p>To answer the original question, one way you could do this, and mind you, this is a bit of a hack, simply <a href="https://github.com/douglascrockford/JSON-js/blob/master/json2.js">serialize the t... |
How to convert std::string to LPCWSTR in C++ (Unicode) <p>I'm looking for a method, or a code snippet for converting std::string to LPCWSTR</p>
| <p>Thanks for the link to the MSDN article. This is exactly what I was looking for.</p>
<pre><code>std::wstring s2ws(const std::string& s)
{
int len;
int slength = (int)s.length() + 1;
len = MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, 0, 0);
wchar_t* buf = new wchar_t[len];
MultiByteToW... |
Why aren't Enumerations Iterable? <p>In Java 5 and above you have the foreach loop, which works magically on anything that implements <code>Iterable</code>:</p>
<pre><code>for (Object o : list) {
doStuff(o);
}
</code></pre>
<p>However, <code>Enumerable</code> still does not implement <code>Iterable</code>, meaning ... | <p>As an easy and <strong>clean</strong> way of using an Enumeration with the enhanced for loop, convert to an ArrayList with java.util.Collections.list.</p>
<pre><code>for (TableColumn col : Collections.list(columnModel.getColumns()) {
</code></pre>
<p>(javax.swing.table.TableColumnModel.getColumns returns Enumerati... |
Find number of files with a specific extension, in all subdirectories <p>Is there a way to find the number of files of a specific type without having to loop through all results inn a Directory.GetFiles() or similar method? I am looking for something like this:</p>
<pre><code>int ComponentCount = MagicFindFileCount(@"... | <p>You should use the <a href="http://msdn.microsoft.com/en-us/library/ms143316.aspx" rel="nofollow">Directory.GetFiles(path, searchPattern, SearchOption)</a> overload of Directory.GetFiles().</p>
<p>Path specifies the path, searchPattern specifies your wildcards (e.g., *, *.format) and SearchOption provides the optio... |
How to add (simple) tracing in C#? <p>I want to introduce some tracing to a C# application I am writing. Sadly, I can never really remember how it works and would like a tutorial with reference qualities to check up on every now and then. It should include:</p>
<ul>
<li>App.config / Web.config stuff to add for registe... | <p>I wrote a short article on using the Trace Listener - maybe it will be of some help, especially for beginners - <a href="http://www.daveoncsharp.com/2009/09/create-a-logger-using-the-trace-listener-in-csharp/">http://www.daveoncsharp.com/2009/09/create-a-logger-using-the-trace-listener-in-csharp/</a></p>
|
Integrating Qt into legacy MFC applications <p>We currently maintain a suit of MFC applications that are fairly well designed, however the user interface is beginning to look tired and a lot of the code is in need quite a bit of refactoring to tidy up some duplication and/or performance problems. We make use of quite ... | <p>In my company, we are currently using Qt and are very happy with it.</p>
<p>I personnally never had to move a MFC-app into using the Qt framework, but here is something which might be of some interest for you :</p>
<p><strike><a href="http://www.qtsoftware.com/products/appdev/add-on-products/catalog/3/Windows/qtwi... |
Microsoft .Net framework 3.5 SP1 Setup Fails <p>On my Vista machine I cannot install the .Net framework 3.5 SP1. Setup ends few moments after ending the download of the required files, stating in the log that: </p>
<pre><code>[08/26/08,09:46:11] Microsoft .NET Framework 2.0SP1 (CBS): [2] Error: Installation failed for... | <p><a href="http://blogs.msdn.com/astebner/archive/2007/08/24/4548657.aspx" rel="nofollow">Here is an article describing what might be your problem.</a></p>
|
C++ : Opening a file in non exclusive mode <p>I have to develop an application which parses a log file and sends specific data to a server. It has to run on both Linux and Windows. </p>
<p>The problem appears when I want to test the log rolling system (which appends .1 to the name of the creates a new one with the sam... | <blockquote>
<p>Is there a way to open file in a non-exclusive way,</p>
</blockquote>
<p>Yes, using Win32, passing the various FILE_SHARE_Xxxx flags to CreateFile.</p>
<blockquote>
<p>is it cross platform?</p>
</blockquote>
<p>No, it requires platform-specific code.</p>
<p>Due to annoying backwards compatibilit... |
What are models for storing tree structures and what are their characteristics? <p>So far I have encountered adjacency list, nested sets and nested intervals as models for storing tree structures in a database. I know these well enough and have migrated trees from one to another.</p>
<p>What are other popular models? ... | <p>A variation is where you use a direct hierarchical representation (ie. parent link in node), but also store a path value.</p>
<p>ie. for a directory tree consisting of the following:</p>
<pre><code>C:\
Temp
Windows
System32
</code></pre>
<p>You would have the following nodes</p>
<pre><code>Key N... |
Finding a DOI in a document or page <p>The <a href="http://doi.org/">DOI</a> system places basically no useful limitations on what constitutes <a href="http://doi.org/handbook_2000/enumeration.html#2.2">a reasonable identifier</a>. However, being able to pull DOIs out of PDFs, web pages, etc. is quite useful for citati... | <p>Ok, I'm currently extracting thousands of DOIs from free form text (XML) and I realized that <a href="http://stackoverflow.com/a/10300246/89771">my previous approach</a> had a few problems, namely regarding encoded entities and trailing punctuation, so I went on reading <a href="http://www.doi.org/doi_handbook/2_Num... |
How bad is dynamic casting? <p>We often hear/read that one should avoid dynamic casting. I was wondering what would be 'good use' examples of it, according to you?</p>
<p>Edit:</p>
<p>Yes, I'm aware of <a href="http://stackoverflow.com/questions/28002/regular-cast-vs-staticcast-vs-dynamiccast">that other thread</a>: ... | <p>This recent thread gives an example of where it comes in handy. There is a base Shape class and classes Circle and Rectangle derived from it. In testing for equality, it is obvious that a Circle cannot be equal to a Rectangle and it would be a disaster to try to compare them. While iterating through a collection of ... |
SQL Server DateTime conversion failure <p>I have a large table with 1 million+ records. Unfortunately, the person who created the table decided to put dates in a <code>varchar(50)</code> field.</p>
<p>I need to do a simple date comparison -</p>
<pre><code>datediff(dd, convert(datetime, lastUpdate, 100), getDate()) &l... | <p>Place the <code>CASE</code> and <code>ISDATE</code> inside the <code>CONVERT()</code> function.</p>
<p><code>
SELECT COUNT(*) FROM MyTable
WHERE
DATEDIFF(dd, CONVERT(DATETIME, CASE IsDate(lastUpdate) when 1 then lastUpdate ELSE '12-30-1899' end), getDate()) < 31
</code></p>
<p>Replace '<code>12-30-1899</co... |
Create an Attribute to Break the Build <p>OK, this kind of follows on from <a href="http://stackoverflow.com/questions/27758/notify-developer-of-a-do-not-use-method" rel="nofollow">my previous question</a>.</p>
<p>What I would really like to do is create some sort of attribute which allows me to decorate a method that... | <p>If this is for XML serialization and NHibernate, where you want the parameterless constructor to be accessible (as is the case in the <a href="http://stackoverflow.com/questions/27758/notify-developer-of-a-do-not-use-method#27796" rel="nofollow">example</a> you referenced), then use a private or protected parameterl... |
Multiple classes in a header file vs. a single header file per class <p>For whatever reason, our company has a coding guideline that states:</p>
<p><code>Each class shall have it's own header and implementation file.</code></p>
<p>So if we wrote a class called <code>MyString</code> we would need an associated <strong... | <h2>Overwhelmed by thousands lines of code?</h2>
<p>Having one set of header/source files per class in a directory can seem overkill. And if the number of classes goes toward 100 or 1000, it can even be frightening.</p>
<p>But having played with sources following the philosophy "let's put together everything", the co... |
Can I maintain state between calls to a SQL Server UDF? <p>I have a SQL script that inserts data (via INSERT statements currently numbering in the thousands) One of the columns contains a unique identifier (though not an IDENTITY type, just a plain ol' int) that's actually unique across a few different tables. </p>
<p... | <p>If you have 2 users hitting it at the same time they will get the same id. Why didn't you use an id table with an identity instead, insert into that and use that as the unique (which is guaranteed) id, this will also perform much faster</p>
<blockquote>
<blockquote>
<p>sp_getNextID </p>
</blockquote>
</bloc... |
Proxy which requires authentication with Android Emulator <p>Has anybody managed to get the Android Emulator working behind a proxy which requires authentication?</p>
<p>I've tried setting the -http-proxy argument to </p>
<pre><code>http://DOMAIN/USERNAME:PASSWORD@IP:PORT
</code></pre>
<p>but am having no success. <... | <p>I Managed to do it in the Adndroid 2.2 Emulator.</p>
<pre><code>Go to "Settings" -> "Wireless & Networks" -> "Mobile Networks" -> "Access Point Names" -> "Telkila"
</code></pre>
<p>Over there set the proxy host name in the property "Proxy"
and the Proxy port in the property "Port"</p>
|
Corporate-Friendly Open Source Licenses <p>What open source licenses are more corporate-friendly, i.e., they can be used in commercial products without the need to open source the commercial product?</p>
| <p>I recommend the Apache License (specifically, version 2). It is not a âcopy leftâ license and it addresses several matters that are important to established companies and their lawyers.</p>
<p>âCopy leftâ is the philosophy of the free software foundation requiring anything incorporating the licensed opens ... |
Is it possible to use nHibernate with Paradox database? <p>Is it possible to configure nHibernate to connect to Paradox database (<code>*.db</code> files)?</p>
| <p>Yes, sort of. </p>
<p>There is no support included in the trunk, you need to write your own dialect. Or you can port the <a href="http://www.hxtt.com/hibernate.html" rel="nofollow">Paradox dialect created for Hibernate</a>.</p>
|
Why is it bad practice to make multiple database connections in one request? <p>A discussion about Singletons in <strong>PHP</strong> has me thinking about this issue more and more. Most people instruct that you shouldn't make a bunch of DB connections in one request, and I'm just curious as to what your reasoning is. ... | <p>Database connections are a limited resource. Some DBs have a very low connection limit, and wasting connections is a major problem. By consuming many connections, you may be blocking others for using the database.</p>
<p>Additionally, throwing a ton of extra connections at the DB doesn't help anything unless ther... |
Windows Mobile - What scripting platforms are available? <p>We have a number of users with Windows Mobile 6 and need to apply minor changes. eg. update a registry setting. One option is push and execute an executable file using our device management software.</p>
<p>I'd like this to be a little more friendly for the a... | <p>I work on windows mobile full time and have never really come across a good Windows Mobile scripting implementation unfortunately. For some reason MS has never seen the need for it. For example, even though you can actually get a command console on WM, it does not support running batch files, even though all the c... |
Scrum - How to get better input from the functional/commercial team <p>We are a small team of 3 developers (2 experienced but new to this particular business sector) developing a functionally complex product. We're using Scrum and have a demo at the end of each sprint. Its clear that the functional team have plenty ... | <p>Have you tried working with your customer to define / formulate <strong>acceptance tests</strong>?<br />
Using something like Fit to come up with these tests - would result in better specs as well as force the customer to think about what is really required. The icing on the cake is instant-doc-executable specs at t... |
Guide to choosing between REST vs SOAP services? <p>Does anyone have links to documentation or guides on making the decision between REST vs. SOAP? I understand both of these but am looking for some references on the key decision points, eg, security, which may make you lean towards one or the other.</p>
| <p><a href="http://www.prescod.net/rest/rest_vs_soap_overview/">Google first hit</a> seems pretty comprehensive.</p>
<p>I think the problem here is there are too many advocates of one or the other, may be better of googling and getting more of a handle of the pro's/con's yourself and making your own decision.</p>
<p>... |
SharePoint SPContext.List in a custom application page <p>I have a custom SharePoint application page deployed to the _layouts folder. It's a custom "new form" for a custom content type. During my interactions with this page, I will need to add an item to my list. When the page first loads, I can use SPContext.Curre... | <p>I would be surprised if you could do something in a _Layouts file that you can't do in a forms template. You have pretty much the same technologies at your disposal. </p>
<p>Looking at the way SharePoint works with ListItems and Layouts pages (for example "Manage Permissions" on a list item), I can see that they pa... |
Linq To SQL: Can I eager load only one field in a joined table? <p>I have one table "orders" with a foreing key "ProductID".</p>
<p>I want to show the orders in a grid with the <strong>product name</strong>, without <strong>LazyLoad</strong> for better performance, but I if use <strong>DataLoadOptions</strong> it retr... | <p>What you are asking for is a level of optimisation the linq-to-sql does not provide. I think your best bet is to create a query that returns exactly the data you want, possibly as an anonymous type:</p>
<pre><code>from order in DB.GetTable<Orders>()
join product in DB.GetTable<Products>()
on order.Produ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.