input stringlengths 51 42.3k | output stringlengths 18 55k |
|---|---|
Is there a Functional Programming library for .NET? <p>For example, in Java there is <a href="http://functionaljava.org/">Functional Java</a> and <a href="http://www.cs.chalmers.se/~bringert/hoj/">Higher-Order Java</a>. Both essentially give a small API for manipulating higher-order, curried functions, and perhaps a f... | <p>have you looked into <a href="http://research.microsoft.com/fsharp/fsharp.aspx">F#</a>?</p>
<p>Also a neat blog post would be <a href="http://geekswithblogs.net/akraus1/articles/79880.aspx">here</a> that talks about how to use the new generic / lambda expressions built into c# 3.0.</p>
<p>If you just add using Sys... |
Is it the filename or the whole URL used as a key in browser caches? <p>It's common to want browsers to cache resources - JavaScript, CSS, images, etc. until there is a new version available, and then ensure that the browser fetches and caches the new version instead.</p>
<p>One solution is to embed a version number i... | <p>Yes, any change in <em>any part</em> of the URL (excluding HTTP and HTTPS protocols changes) is interpreted as a different resource by the browser (and any intermediary proxies), and will thus result in a separate entity in the browser-cache.</p>
<p><strong>Update:</strong></p>
<p>The claim in <a href="http://www.... |
Samba, other non interactive accounts - noshell, nologin, or blank? <p>Conducting a user account cleanup accross Solaris and Redhat linux systems, many of which have a number of Samba shares. </p>
<p>What preference do people have for creating the local unix accounts for non interactive Samba users? In particular, the... | <p>I have seen the shell set to the <code>passwd</code> command so that logging in only gives an opportunity to change the password. This may or may not be appropriate in your non-interactive user case, but it has the upside of allowing people to change passwords without bothering an admin.</p>
|
Getting a full list of the URLS in a rails application <p>How do I get a a complete list of all the urls that my rails application could generate? </p>
<p>I don't want the routes that I get get form rake routes, instead I want to get the actul URLs corrosponding to all the dynmically generated pages in my application.... | <p>I was able to produce useful output with the following command:</p>
<pre><code>$ wget --spider -r -nv -nd -np http://localhost:3209/ 2>&1 | ack -o '(?<=URL:)\S+'
http://localhost:3209/
http://localhost:3209/robots.txt
http://localhost:3209/agenda/2008/08
http://localhost:3209/agenda/2008/10
http://localho... |
How do indicate the SQL default library in an IBM iSeries 2 connection string to an AS/400? <p>I'm connecting to an AS/400 stored procedure layer using the IBM iSeries Access for Windows package. This provides a .NET DLL with classes similar to those in the <code>System.Data</code> namespace. As such we use their imple... | <p>If you are connecting <strong>through .NET</strong>:</p>
<pre><code>Provider=IBMDA400;Data Source=as400.com;User Id=user;Password=password;Default Collection=yourLibrary;
</code></pre>
<p><em><strong>Default Collection</em></strong> is the parameter that sets the library where your programs should start executing.... |
MySql - Create Table If Not Exists Else Truncate? <p><strong>Here is the updated question:</strong></p>
<p>the current query is doing something like:<br></p>
<pre><code>$sql1 = "TRUNCATE TABLE fubar";
$sql2 = "CREATE TEMPORARY TABLE IF NOT EXISTS fubar SELECT id, name FROM barfu";
</code></pre>
<p>The first time the... | <p>shmuel613, it would be better to update your original question rather than replying. It's best if there's a single place containing the complete question rather than having it spread out in a discussion.</p>
<p>Ben's answer is reasonable, except he seems to have a 'not' where he doesn't want one. Dropping the table... |
Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language? <p>I wonder why would a C++, C#, Java developer want to learn a dynamic language?</p>
<p>Assuming the company won't switch its main development language from C++/C#/Java to a dynamic one what use is there for a dynamic la... | <p>A lot of times some quick task comes up that isn't part of the main software you are developing. Sometimes the task is one off ie compare this file to the database and let me know the differences. It is a lot easier to do text parsing in Perl/Ruby/Python than it is in Java or C# (partially because it is a lot easi... |
Problem with Java 1.6 and Desktop.open() <p>I've been using Destop.open() to launch a .pdf viewer on Windows machines, both Vista and XP, and most of them work just fine. However, on one XP machine the call does not work, simply returning without throwing any exceptions, and the viewer does not launch. On that machin... | <p>This is a known problem with early versions of XP SP2, the ShellExecute function stopped accepting URIs; bring the XP machines patches up to date.</p>
<p>To view the exceptions make sure the Java Console is turned on:</p>
<pre><code>Control Panel->Java Control Panel->Advanced->Java Console.
</code></pre>
|
How do you authenticate against an Active Directory server using Spring Security? <p>I'm writing a Spring web application that requires users to login. My company has an Active Directory server that I'd like to make use of for this purpose. However, I'm having trouble using Spring Security to connect to the server.</... | <p>I had the same banging-my-head-against-the-wall experience you did, and ended up writing a custom authentication provider that does an LDAP query against the Active Directory server.</p>
<p>So my security-related beans are:</p>
<pre><code><beans:bean id="contextSource"
class="org.springframework.security.ldap.... |
How do I efficiently search an array to fill in form fields? <p>I am looking for an efficient way to pull the data I want out of an array called $submission_info so I can easily auto-fill my form fields. The array size is about 120.</p>
<p>I want to find the field name and extract the content. In this case, the field ... | <p>You're probably best off going through each entry and creating a new associative array out of it.</p>
<pre><code>foreach($submission_info as $elem) {
$newarray[$elem["field_name"]] = $elem["content"];
}
</code></pre>
<p>Then you can just find the form fields by getting the value from $newarray[<em><field yo... |
Distributed hierarchical clustering <p>Are there any algorithms that can help with hierarchical clustering?
Google's map-reduce has only an example of k-clustering. In case of hierarchical clustering, I'm not sure how it's possible to divide the work between nodes.
Other resource that I found is: <a href="http://issues... | <p>First, you have to decide if you're going to build your hierarchy bottom-up or top-down. </p>
<p>Bottom-up is called Hierarchical agglomerative clustering. Here's a simple, well-documented algorithm: <a href="http://nlp.stanford.edu/IR-book/html/htmledition/hierarchical-agglomerative-clustering-1.html" rel="nofollo... |
How to communicate with a windows service from an application that interacts with the desktop? <p>With .Net what is the best way to interact with a service (i.e. how do most tray-apps communicate with their servers). It would be preferred if this method would be cross-platform as well (working in Mono, so I guess remo... | <p>Be aware that if you are planning to eventually deploy on Windows Vista or Windows Server 2008, many ways that this can be done today will not work. This is because of the introduction of a new security feature called "Session 0 Isolation". </p>
<p>Most windows services have been moved to run in Session 0 now in or... |
How do you maintain large t-sql procedures <p>I'm about to inherit a set of large and complex set of stored procedures that do monthly processing on very large sets of data.</p>
<p>We are in the process of debugging them so they match the original process which was written in VB6. The reason they decided to re write t... | <p>First, create a directory full of .sql files and maintain them there. Add this set of .sql files to a revision control system. SVN works well. Have a tool that loads these into your database, overwriting any existing ones.</p>
<p>Have a testing database, and baseline reports showing what the output of the monthly p... |
Resending invitation/action emails <p>I've got a web app that sends out emails in response to a user-initaited action. These emails prompt the recipient for a response (an URL is included related to the specific action.)</p>
<p>I've got some users asking for a "resend" feature to push that email again. </p>
<p>My obj... | <p>Definitely useful, at least from the user's point of view. By manually resending the email, they <em>know</em> that it has been sent and can check their spam folder immediately to catch the mail. Otherwise, they might not know about the mail and it will dissapear from their spam before they can catch it.</p>
|
Object Oriented Update Approach <p>I've been tasked with maintaining an application originally written in VB6. It has since been imported into VB .Net and to say the least the code is anything but Object Oriented. The code is riddled with classes which contain nothing more than Public Shared attributes(variables) and m... | <p>Build a class which reads the XML file in, and provides properties/methods/etc based upon the data in that file. When the class writes the XML file back out, have it format in the manner needed for the new version.</p>
<p>So, basically, the class will be able to read in the current version, plus all the older versi... |
How does the Java for each loop work? <pre><code>List<String> someList = new ArrayList<String>();
// add "monkey", "donkey", "skeleton key" to someList
</code></pre>
<pre><code>for (String item : someList) {
System.out.println(item);
}
</code></pre>
<p>What would the equivalent for loop look like wi... | <pre><code>for(Iterator<String> i = someList.iterator(); i.hasNext(); ) {
String item = i.next();
System.out.println(item);
}
</code></pre>
<p>Note that if you need to use <code>i.remove();</code> in your loop, or access the actual <code>iterator</code> in some way, you cannot use the <code>for( : )</cod... |
Which language is useful to create a report for a valid C program <p>Can anyone suggest me a helpful programming language which can be used to create a tool which will analyse the given C program and generate a txt report or html report containing information about the given program (function list, variable list etc).
... | <p><a href="http://ctags.sourceforge.net/" rel="nofollow">ctags</a>, perhaps?</p>
<blockquote>
<p>Ctags generates an index (or tag) file of language objects found in source files that allows these items to be quickly and easily located by a text editor or other utility. A tag signifies a language object for which an... |
Most common cause of "java.lang.NullPointerException" when dealing with XMLs? <p>My strongest lead is that the code who deals with the incoming XMLs is actually receiving an invalid/incomplete file hence failing the DOM parsing. Any suggestions?</p>
| <p>Incomplete file is definitely the place to start looking. I'd print out the file right before the point you parse it to see what's getting sent to the parser. If it's incomplete it will be obvious. If it's invalid, you'll have a little searching to do.</p>
|
SQL Server 2005 Linked Server to DB2 Performance issue <p>I have a SQL Server 2005 machine with a JDE DB2 set up as a linked server.</p>
<p>For some reason the performance of any queries from this box to the db2 box are horrible.</p>
<p>For example. The following takes 7 mins to run from Management Studio</p>
<pre><... | <p>In certain searches SQL Server will decide to pull the entire table down to itself and sort and search the data within SQL Server instead of sending the query to the remote server. This is usually a problem with collation settings. </p>
<p>Make sure the provider has the following options set:
Data Access,
Collati... |
MVC C# custom MvcRouteHandler - How to? <p>Does anyone have experiences in providing a custom MvcRouteHandler? In my application I'd like to implement a globalization-pattern like <em>http://mydomain/en/about</em> or <em>http://mydomain/de/about</em>. </p>
<p>As for persistance, I'd like to have a cookie read as soon ... | <p>I don't believe a custom route handler is required for what you are doing.</p>
<p>For your "globalized" URIs, a regular MVC route, with a constraint that the "locale" parameter must be equal to "en", "de", etc., will do. The constraint will prevent non-globalized URIs from matching the route.</p>
<p>For a "non-glo... |
AJAX - How to Pass value back to server <p>First time working with UpdatePanels in .NET. </p>
<p>I have an updatepanel with a trigger pointed to an event on a FormView control. The UpdatePanel holds a ListView with related data from a separate database.</p>
<p>When the UpdatePanel refreshes, it needs values from the ... | <p>make a javascript function that will collect the pieces of form data, and then sends that data to an ASHX handler. the ASHX handler will do some work, and can reply with a response.</p>
<p>This is an example I made that calls a database to populate a grid using AJAX calls. There are better libraries for doing AJAX ... |
PHP DOMDocument stripping HTML tags <p>I'm working on a small templating engine, and I'm using DOMDocument to parse the pages. My test page so far looks like this:</p>
<pre><code><block name="content">
<?php echo 'this is some rendered PHP! <br />' ?>
<p>Main column of <span>conte... | <p>Nothing: nodeValue is the concatenation of the value portion of the tree, and will never have tags.</p>
<p>What I would do to make an HTML fragment of the tree under $node is this:</p>
<pre><code>
$doc = new DOMDocument();
foreach($node->childNodes as $child) {
$doc->appendChild($doc->importNode($child, true))... |
php $_GET sort problem <p>here is the input i am getting from my flash file </p>
<p>process.php?Q2=898&Aa=Grade1&Tim=0%3A0%3A12&Q1=908&Bb=lkj&Q4=jhj&Q3=08&Cc=North%20America&Q0=1</p>
<p>and in php i use this code
foreach ($_GET as $field => $label)
{
$datarray[]=$_GET[$field];</p>... | <pre><code>ksort($_GET);
</code></pre>
<p>This should <a href="http://php.net/manual/en/function.ksort.php" rel="nofollow">sort</a> the $_GET array by it's keys. <a href="http://php.net/manual/en/function.krsort.php" rel="nofollow">krsort</a> for reverse order.</p>
|
Determine if a function exists in bash <p>Currently I'm doing some unit tests which are executed from bash. Unit tests are initialized, executed and cleaned up in a bash script. This script usualy contains an init(), execute() and cleanup() functions. But they are not mandatory. I'd like to test if they are or are not ... | <p>I think you're looking for the 'type' command. It'll tell you whether something is a function, built-in function, external command, or just not defined. Example:</p>
<pre class="lang-none prettyprint-override"><code>$ type foo
bash: type: foo: not found
$ type ls
ls is aliased to `ls --color=auto'
$ which type
$... |
How much success is there working on ASP.NET decompiled by Reflector? <p>I just finished a small project where changes were required to a pre-compiled, but no longer supported, ASP.NET web site. The code was ugly, but it was ugly before it was even compiled, and I'm quite impressed that everything still seems to work ... | <p>Due to all the compiler sugar that exists in the .NET platform, you can't decompile a binary into the original code without extremely sophisticated decompilers. For instance, the compiler creates classes in the background to handle enclosures. Automating this kind of thing seems like it would be a daunting task. ... |
OpenID providers - what stops malicious providers? <p>So I like the OpenID idea. I support it on my site, and use it wherever it's possible (like here!). But I am not clear about one thing. </p>
<p>A site that supports OpenID basically accepts any OpenID provider out there, right? How does that work with sites tha... | <p>You have confused two different things - identification and authorization. Just because you know who somebody is, it doesn't mean you have to automatically give them permission to do anything. Simon Willison covers this nicely in <a href="http://blog.simonwillison.net/post/57956829720/account" rel="nofollow">An Op... |
Can I make Perl ithreads in Windows run concurrently? <p>I have a Perl script that I'm attempting to set up using Perl Threads (use threads). When I run simple tests everything works, but when I do my actual script (which has the threads running multiple SQL*Plus sessions), each SQL*Plus session runs in order (i.e., t... | <p>A few possible explanations:</p>
<ol>
<li><p>Are you running this script on a multi-core processor or multi-processor machine? If you only have one CPU only one thread can use it at any time.</p></li>
<li><p>Are there transactions or locks involved with steps 1-6 that would prevent it from being done concurrently?... |
Good Linux (Ubuntu) SVN client <p>Subversion has a superb client on Windows (Tortoise, of course). Everything I've tried on Linux just - well - sucks in comparison....</p>
| <p><em>Disclaimer: A long long time ago I was one of the developers for RabbitVCS (previously known as NautilusSvn).</em></p>
<p>If you use Nautilus then you might be interested in <a href="http://rabbitvcs.org/">RabbitVCS</a> (mentioned earlier by Trevor Bramble). It's an unadulterated clone of TortoiseSVN for Nautil... |
Designing a WPF map control <p>I'm thinking about making a simple map control in WPF, and am thinking about the design of the basic map interface and am wondering if anyone has some good advice for this. </p>
<p>What I'm thinking of is using a ScrollViewer (sans scroll bars) as my "view port" and then stacking everyt... | <p>If you're looking for a good start, you can use the foundation of code supplied by the <a href="http://www.codeplex.com/SharpMap/" rel="nofollow">SharpMap</a> project and build out from there. If I recall there were a few people already working on a WPF renderer for SharpMap, so you may also have some code to begin ... |
Different values of GetHashCode for inproc and stateserver session variables <p>I've recently inherited an application that makes very heavy use of session, including storing a lot of custom data objects in session. One of my first points of business with this application was to at least move the session data away from... | <p>When you write</p>
<blockquote>
<p>does a lot of object comparisons using GetHashCode()</p>
</blockquote>
<p>i sense there is something horribly wrong with this code. The GetHashCode method does not guarantee, that the returned hash values should be in any way unique given two different objects. As far as GetHas... |
Does DataGrid on CE 5.0 Compact Framework .NET support editing? <p>I am trying to get a DataGrid under CE 5.0 / .NET CF 2.0 that a user can edit. The document at <a href="http://msdn.microsoft.com/en-us/library/ms838165.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms838165.aspx</a> indicates that some ... | <p>No, it is not directly editable. MSDN has samples for using the DataGrid, including suggestions for data editing, for both <a href="http://msdn.microsoft.com/en-us/library/ms229684.aspx" rel="nofollow">Pocket PC</a> and <a href="http://msdn.microsoft.com/en-us/library/ms229659.aspx" rel="nofollow">Smartphone</a> de... |
How to check if a String contains another String in a case insensitive manner in Java? <p>Say I have two strings,</p>
<pre><code>String s1 = "AbBaCca";
String s2 = "bac";
</code></pre>
<p>I want to perform a check returning that <code>s2</code> is contained within <code>s1</code>. I can do this with:</p>
<pre><code>... | <p>Yes, contains is case sensitive. You can use java.util.regex.Pattern with the CASE_INSENSITIVE flag for case insensitive matching:</p>
<pre><code>Pattern.compile(Pattern.quote(s2), Pattern.CASE_INSENSITIVE).matcher(s1).find();
</code></pre>
<p><strong>EDIT:</strong> If s2 contains regex special characters (of whi... |
Is there a specific name for the node that coresponds to a subtree? <p>I'm designing a web site navigation hierarchy. It's a tree of nodes. Nodes represent web pages.</p>
<p>Some nodes on the tree are special. I need a name for them.</p>
<p>There are multiple such nodes. Each is the "root" of a sub-tree with pages ... | <p>How about Root (node with children, but no parent), Node (node with children and parent) and Leaf (node with no children and parent)?</p>
<p>You can then distinguish by name and position within the tree structure (E.g. DepartmentRoot, DepartmentNode, DepartmentLeaf) if need be..</p>
<h2>Update Following Comment fr... |
Is the syntax for the Wordpress style.css template element available anywhere? <p>I've recently embarked upon the <em>grand voyage</em> of Wordpress theming and I've been reading through the Wordpress documentation for how to write a theme. One thing I came across <a href="http://codex.wordpress.org/Theme_Development"... | <p>Based on <a href="http://codex.wordpress.org/Theme_Development">http://codex.wordpress.org/Theme_Development</a>:</p>
<p>The following is an example of the first few lines of the stylesheet, called the style sheet header, for the Theme "Rose":</p>
<pre><code>/*
Theme Name: Rose
Theme URI: the-theme's-homepage
D... |
What are the best practices for using html with xml based languages like svg? <p>From browsing on this site and elsewhere, I've learned that serving websites as xhtml at present <a href="http://hixie.ch/advocacy/xhtml" rel="nofollow">is considered harmful</a>.</p>
<p>Delivering xhtml and serving it as application/xhtm... | <p>In HTML you won't be able to insert SVG directly. </p>
<p>You can embed SVG files with <code><object></code>/<code><embed></code> and in cutting-edge browsers (Opera, Safari) also <code><img></code> and CSS <code>background-image</code>.</p>
<p>You can put SVG in <code>data:</code> URI to avoid u... |
Where to find Java 6 JSSE/JCE Source Code? <p>Where can I download the JSSE and JCE source code for the latest release of Java? The source build available at <a href="https://jdk6.dev.java.net/">https://jdk6.dev.java.net/</a> does not include the javax.crypto (JCE) packages nor the com.sun.net.ssl.internal (JSSE) pack... | <p>there: <a href="http://openjdk.java.net/groups/security/">openjdk javax.net</a> in the security group </p>
<pre><code>src/share/classes/javax/net
src/share/classes/com/sun/net/ssl
src/share/classes/sun/security/ssl
src/share/classes/sun/net/www/protocol/https
</code></pre>
<p>also on this page:</p>
<pre><code>src... |
In Rails, after using find with :select, my objects don't save <p>Running something like:</p>
<p>@users = User.find(:first, :select => "name, lastname, salary")
for @user in @users do
@user.salary = 100000
@user.save
end</p>
<p>After this looking up in the Mysql table, the users aren't updated.</p>
| <p>ActiveRecord doesn't know the object's id, in order to save the data.
So include the id field in :select, like the example below:</p>
<p>@users = User.find(:first, :select => "id, name, lastname, salary")</p>
|
.NET library for processing HTML e-mails & stripping previous responses <p>Does anyone know of a .NET library that will process HTML e-mails and can be used to trim out the reply-chain? It needs to be able to accept HTML -or- text mails and then trim out everything but the actual response, removing the trail of messag... | <p>This does not answer much of your question, but the W3C's <a href="http://www.w3.org/Tools/html2things.html" rel="nofollow">Converting HTML to Other Formats</a> has a section on converting HTML to text. I hope it helps someone develop a full answer to your question!</p>
|
Mocking WebResponse's from a WebRequest <p>I have finally started messing around with creating some apps that work with RESTful web interfaces, however, I am concerned that I am hammering their servers every time I hit F5 to run a series of tests..</p>
<p>Basically, I need to get a series of web responses so I can tes... | <p>I found this question while looking to do exactly the same thing. Couldn't find an answer anywhere, but after a bit more digging found that the .Net Framework has built in support for this.</p>
<p>You can register a factory object with <code>WebRequest.RegisterPrefix</code> which <code>WebRequest.Create</code> will... |
How do I choose a CMS/Portal solution for a small website(s)? <p>I currently maintain 3 websites all revolving around the same concept. 2 of them are WinForms applications where the website gives a few basic details, and download links. The third is a web application to query data. I also have a forum (SMF/TinyPortal) ... | <p>If you want to quickly compare features on CMS's, then take a look at <a href="http://www.cmsmatrix.org/" rel="nofollow">CMS Matrix</a> - has practically every cms known to man on there.</p>
<p><em>Edit</em>
To be a little more precise, from the site</p>
<blockquote>
<p>CMSMatrix is the number one content manage... |
How does gcc implement stack unrolling for C++ exceptions on linux? <p>How does gcc implement stack unrolling for C++ exceptions on linux? In particular, how does it know which destructors to call when unrolling a frame (i.e., what kind of information is stored and where is it stored)?</p>
| <p>See section 6.2 of the <a href="http://www.x86-64.org/documentation/abi.pdf" rel="nofollow">x86_64 ABI</a>. This details the interface but not a lot of the underlying data. This is also independent of C++ and could conceivably be used for other purposes as well.</p>
<p>There are primarily two sections of the ELF bi... |
How to edit sessions parameters on Oracle 10g XE? <p>default is 49</p>
<p>how to edit to higher?</p>
| <p>You will need to issue the following command (connected as a user that has alter system privileges, sys will do it)</p>
<p>alter system set sessions=<em>numberofsessions</em> scope=spfile;</p>
<p>Have you been getting an ORA-12516 or ORA-12520 error?
If so it's probably a good idea to increase the number of proces... |
How to embed audio/video on HTML page that plays on iPhone browser over GPRS <p>Although I don't have an iPhone to test this out, my colleague told me that embedded
media files such as the one in the snippet below, only works when the iphone is connected over the
WLAN connection or 3G, and does not work when connecting... | <p>The iPhone YouTube application automatically downloads lower quality video when connected via EDGE than when connected via Wi-Fi, because the network is much slower. That fact leads me to believe Apple would make the design decision to not bother downloading an MP3 over EDGE. The browser has no way to know in adva... |
Numbering Regex Submatches <p>Is there a canonical ordering of submatch expressions in a regular
expression? </p>
<p>For example: What is the order of the submatches in<br />
"(([0-9]{3}).([0-9]{3}).([0-9]{3}).([0-9]{3}))\s+([A-Z]+)" ?</p>
<pre><code>a. (([0-9]{3})\.([0-9]{3})\.([0-9]{3})\.([0-9]{3}))\s+([A-Z]+)
... | <p>They tend to be numbered in the order the capturing parens start, left to right. Therefore, option b.</p>
|
What are good grep tools for Windows? <p>Any recommendations on <a href="http://en.wikipedia.org/wiki/Grep">grep</a> tools for Windows? Ideally ones that could leverage 64-bit OS.</p>
<p>I'm aware of <a href="http://www.cygwin.com/">Cygwin</a>, of course, and have also found <a href="http://www.powergrep.com/">PowerGR... | <p><a href="http://ss64.com/nt/findstr.html">FINDSTR</a> is fairly powerful, supports <a href="http://en.wikipedia.org/wiki/Regular_expression">regular expressions</a> and has the advantages of being on all Windows machines already.</p>
<pre><code>c:\> FindStr /?
Searches for strings in files.
FINDSTR [/B] [/E] [... |
How can I find the location of a regex match in Perl? <p>I need to write a function that receives a string and a regex. I need to check if there is a match and return the start and end location of a match. (The regex was already compiled by <code>qr//</code>.)</p>
<p>The function might also receive a "global" flag and... | <p>The built-in variables <code>@-</code> and <code>@+</code> hold the start and end positions, respectively, of the last successful match. <code>$-[0]</code> and <code>$+[0]</code> correspond to entire pattern, while <code>$-[N]</code> and <code>$+[N]</code> correspond to the <code>$N</code> (<code>$1</code>, <code>$2... |
textboxes in Datarepeater dynamicly 'databound' <p>I need to know if it is possible to dynamically bind a textbox residing within a datarepeater to a 'dynamically' created BindingSource. I am using VB.net. The database I am using is a MySQL database. </p>
<p>I have to use the connection dynamicly due to the fact th... | <p>Your connection string should be defined in your Web.Config, and if you move your database to a different server, it's just a matter of modifying the web.config entry. As long as you keep the connection string name the same, the BindingSource object will pick up the new value from the config.<hr><strong>edit</strong... |
Automated integration testing a C++ app with a database <p>I am introducing automated integration testing to a mature application that until now has only been manually tested.</p>
<p>The app is Windows based and talks to a MySQL database.</p>
<p>What is the best way (including details of any tools recommended) to kee... | <p>How are you verifying the results? </p>
<p>If you need to query the DB (and it sounds like you probably do) for results then I agree with Kris K, except I would endeavor to rebuild the DB after every test case, not just every suite.</p>
<p>This helps avoid dangerous <a href="http://xunitpatterns.com/Erratic%20Test... |
Why do some conversions from wmv to flv with ffmpeg fail? <p>Ive been smashing my head with this for a while. I have 2 completely identical .wmv files encoded with wmv3 codec. I put them both through ffmpeg with the following command:</p>
<pre><code>/usr/bin/ffmpeg -i file.wmv -ar 44100 -ab 64k -qscale 9 -s 512x384 -f... | <p>It is in fact the audio format, which causes trouble. Audio formats are identified by its TwoCC (0x0162 here). You can look up the different TwoCCs here: <a href="http://wiki.multimedia.cx/index.php?title=TwoCC" rel="nofollow">http://wiki.multimedia.cx/index.php?title=TwoCC</a> and you'll find:</p>
<p>0x0162 Windo... |
Using DateAdd in umbraco xslt to display next year's date <p>I'm trying to display the date for a year from now in an xslt file using umbraco like so:</p>
<pre><code><xsl:variable name="now" select="umbraco.library:CurrentDate()"/>
<xsl:value-of select="umbraco.library:DateAdd($now, 'year', 1)"/>
</code></... | <p>The constant 'year' is wrong. It expects just 'y'.</p>
<pre><code><xsl:variable name="now" select="umbraco.library:CurrentDate()"/>
<xsl:value-of select="umbraco.library:DateAdd($now, 'y', 1)"/>
</code></pre>
|
How do you overcome the svn 'out of date' error? <p>I've been attempting move a directory structure from one location to another in Subversion, but I get an <code>Item '*' is out of date</code> commit error. </p>
<p>I have the latest version checked out (so far as I can tell). <code>svn st -u</code> turns up no diffe... | <p>I sometimes get this with TortoiseSVN on windows. The solution for me is to <code>svn update</code> the directory, even though there are no revisions to download or update. It does something to the metadata, which magically fixes it.</p>
|
C#: Is Implicit Arraylist assignment possible? <p>I'd like to populate an arraylist by specifying a list of values just like I would an integer array, but am unsure of how to do so without repeated calls to the "add" method.</p>
<p>For example, I want to assign { 1, 2, 3, "string1", "string2" } to an arraylist. I kno... | <p>Depending on the version of C# you are using, you have different options.</p>
<p>C# 3.0 has collection initializers, detail at <a href="http://weblogs.asp.net/scottgu/archive/2007/03/08/new-c-orcas-language-features-automatic-properties-object-initializers-and-collection-initializers.aspx">Scott Gu's Blog</a></p>
... |
C#: Import/Export Settings into/from a File <p>What's the best way to import/export app internal settings into a file from within an app?</p>
<p>I have the Settings.settings file, winform UI tied to the settings file, and I want to import/export settings, similar to Visual Studio Import/Export Settings feature. </p>
| <p>If you are using the Settings.settings file, it's saving to the config file. By calling YourNamespace.Properties.Settings.Save() after updating your settings, they will be saved to the config files.</p>
<p>However, I have no idea what you mean by "multiple sets of settings." If the settings are user settings, eac... |
Any other tools/plugins like VisualAssist that will change my life (MSVS)? <p>I was introduced to VisualAssist a few years ago and for me there's no going back. Are there any other tools I'm missing out on?</p>
| <p>If you're a vim user, <a href="http://www.viemu.com" rel="nofollow">ViEmu</a> is indispensable. It's a plugin available for Visual Studio (SQL Server and Office as well, although it's sold separately) that transforms the editor into Vim.</p>
<p>Another plugin by the same company is <a href="http://www.codekana.com"... |
KVM/QEMU network TAP problems with libvirt <p>I'm trying to use libvirt with virsh to manage my kvm/qemu vms. The problem I have is with getting it to work with public IPs. The server is running ubuntu 8.04.</p>
<p>libvirt keeps trying to run it as:</p>
<pre><code>/usr/bin/kvm -M pc -m 256 -smp 3 -monitor pty -no-ac... | <p>I followed the bridged networking guide at <a href="https://help.ubuntu.com/community/KVM">https://help.ubuntu.com/community/KVM</a> and have the following in /etc/network/interfaces:</p>
<pre><code>auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
address 192.168.0.10
network 192.168... |
Throwing exceptions in ASP.NET C# <p>Is there a difference between just saying <code>throw;</code> and <code>throw ex;</code> assuming <code>ex</code> is the exception you're catching?</p>
| <p><code>throw ex;</code> will erase your stacktrace. Don't do this unless you mean to clear the stacktrace. Just use <code>throw;</code></p>
|
Can regex capture and substitution be used with an Apache DirectoryMatch directive? <p>Does anyone know if it's possible to use regex capture within Apache's DirectoryMatch directive? I'd like to do something like the following:</p>
<pre><code><DirectoryMatch ^/home/www/(.*)>
AuthType Basic
AuthName $1
... | <p>You could tackle the problem from a completely different angle: enable the perl module and you can include a little perl script in your httpd.conf. You could then do something like this:</p>
<pre><code><Perl>
my @groups = qw/ foo bar baz /;
foreach ( @groups ) {
push @PerlConfig, qq| <Directory /home/w... |
Reporting Services Deployment <p>I need to create a repeatable process for deploying SQL Server Reporting Services reports. I am not in favor of using Visual Studio and or Business Development Studio to do this. The rs.exe method of scripting deployments also seems rather clunky. Does anyone have a very elegant way ... | <p>We use rs.exe, once we developed the script we have not needed to touch it anymore, it just works.</p>
<p>Here is the source (I slightly modified it by hand to remove sensitive data without a chance to test it, hope I did not brake anything), it deploys reports and associated images from subdirectories for various ... |
How do I restore from a drop database command using a mysql binary log? <p>How can I restore a mysql database that was dropped using a "drop database" command? I have access to binary logs which should make this type of rollback possible.</p>
| <p>Documentation Sucks. It alludes to DROP DATABASE being recoverable, but only in odd conditions i'm not familiar with <a href="http://dev.mysql.com/doc/refman/5.0/en/binary-log.html">http://dev.mysql.com/doc/refman/5.0/en/binary-log.html</a> </p>
<p>According to Docs, binlogs are just a sequence of commands executed... |
Polynomial time algorithm for finding a Hamiltonian walk in a graph <p>Is there a polynomial time algorithm for finding a Hamiltonian walk in a graph?</p>
<p>My algorithm is N factorial and is really slow.</p>
| <p>In general, as the (decision version of the) Hamiltonian Path problem is NP-complete, you cannot hope to get a polynomial-time algorithm for finding Hamiltonian paths. You can slightly speed it up with the usual N! → N<sup>2</sup>2<sup>N</sup> dynamic programming trick (compute hp[v][w][S] = "is there a path th... |
Is there any reason to not ship the pdb's with your application? <p>Since you can use reflector to reverse-engineer a .Net app, is there any reason to NOT ship the pdb files with the app? If you do ship them with it, then your stack trace will include the line number with the problem, which is useful if it crashes.</p>... | <p>Shipping pdb does not give any additional convenience to user. So there are no reasons to ship pdb files with the app. Besides pdb file usually have large size.</p>
<p>Instead of shipping pdb files you should use local Microsoft Symbol Server for fast access to pdb files corresponding to error reports. <a href="htt... |
Two Phase Commit/Shared Transaction <p>The scenario is this</p>
<p>We have two applications A and B, both which are running in separate database (Oracle 9i ) transactions</p>
<p>Application A - inserts some data into the database, then calls Application B
Application B - inserts some data into the database, related (... | <p>You have three options:</p>
<ol>
<li><p>Redesign the application so that you don't have two different processes (both with database connections) writing to the database and roll it into a single app.</p></li>
<li><p>Create application C that handles all the database transactions for A and B.</p></li>
<li><p>Roll yo... |
Is it possible to store and retrieve a boolean value in a varchar field using Java JDBC? <p>quick question: my customer has a situation where he has his database with a varchar field and the corresponding jdbc code is storing/retrieving a boolean.</p>
<p>I guess that the boolean values false and true are going to be t... | <p>I agree with the answer that the semantics are highly database specific, which is why I think the important answer is that you <em>shouldn't</em> do this. A change in JDBC driver or something similar could cause the implicit behaviour to break.</p>
<p>Instead, If using raw JDBC, have the code take the boolean and ... |
How can I ban a whole company from my web site? <p>For reasons I won't go into, I wish to ban an entire company from accessing my web site. Checking the remote hostname in php using gethostbyaddr() works, but this slows down the page load too much. Large organizations (eg. hp.com or microsoft.com) often have blocks of ... | <p>How about an .htaccess:</p>
<pre><code>Deny from x.x.x.x
</code></pre>
<p>if you need to deny a range say: 192.168.0.x then you would use</p>
<pre><code>Deny from 192.168.0
</code></pre>
<p>and the same applies for hostnames:</p>
<pre><code>Deny from sub.domain.tld
</code></pre>
<p>or if you want a PHP solutio... |
Annuity or Angle Operation Symbol in LaTeX <p>How do I set the symbol for the <em>angle</em> or <em>annuity</em> operation in LaTeX? Specifically, this is the actuarial <em>a</em> angle <em>s</em> = (1-v<sup>s</sup>)/i.</p>
| <p>I've looked at <a href="http://maths.dur.ac.uk/stats/courses/AMII/am.html">Life's Contingency's Package</a>, various Actuarial Outpost <a href="http://www.actuarialoutpost.com/actuarial_discussion_forum/showthread.php?t=113896">forum</a> <a href="http://www.actuarialoutpost.com/actuarial_discussion_forum/showthread.... |
css help with box models <p>I need help with the css box models. I have a problem with my website ucare-ph.org . The logo (temporary) is covering the main copy. Now I know someone can tell me the code to fix this. But what I really need is a resource or resources in books or websites that can give me a better underst... | <ul>
<li><a href="http://redmelon.net/tstme/box_model/" rel="nofollow">Interactive CSS Box Model</a></li>
<li><a href="http://www.brainjar.com/css/positioning/" rel="nofollow">CSS Positioning</a></li>
</ul>
<p>As to your site's logo, try setting <code>clear: both</code> on the content.</p>
|
App_Code folder issues <p>So I'm having a really weird issue with my App_Code folder on a new website I'm designing. </p>
<p>I have a basic class inside of a namespace in the App_Code folder. Everything works fine in the IDE when I setup the namespace and make an object from the class. It brings up the class summar... | <p>The problem that your classes are not compiled, You'll solve this issue simply by going to the properties of any class in the App_Code folder and change it's 'Build Action' property from "Content" to "Compile"</p>
<p>I was facing this problem and just found the solution..hope it helps any one, I'm sure you're not s... |
Do anyone do test cases for pojos? <p>Is that needed?</p>
| <p>I write explicit tests for everything except simple getters and setters. </p>
<p>If the getter or setter only contains a return blah; or this.blah = blah; I don't think there is much value. The majority of times these are generated and I feel the time putting the tests together could be better spent elsewhere. </p>... |
How do you pass arguments to define_method? <p>I would like to pass an argument(s) to a method being defined using define_method, how would I do that?</p>
| <p>The block that you pass to define_method can include some parameters. That's how your defined method accepts arguments. When you define a method you're really just nicknaming the block and keeping a reference to it in the class. The parameters come with the block. So:</p>
<pre><code>define_method(:say_hi) { |ot... |
Can I display the list of all the system objects (semaphores, queues...) in VxWorks? <p>I would like to know what semaphores, messageQueues, etc... are active in my vxWorks 6.x system. I have access to this information via the debugger, but I would like access to it from the shell.</p>
<p>Is there a way?</p>
| <p>VxWorks 6.x provides a function called classShow() which will list all the objects of a specific class (e.g. semaphores, message queues, tasks, ...).
The following call will give you a list of objects for a given class:</p>
<pre><code>
classShow(objClassIdGet(classId), 1)
The classId types are:
1 windSemClass,... |
How to reference a custom field in SQL <p>I am using mssql and am having trouble using a subquery. The real query is quite complicated, but it has the same structure as this:</p>
<pre><code>select
customerName,
customerId,
(
select count(*)
from Purchases
where Purchases.customerId=customerData.c... | <p>use the field number, in this case:</p>
<pre><code>order by 3
</code></pre>
|
What time should I build to production? <p>My users use the site pretty equally 24/7. Is there a meme for build timing?</p>
<p>International audience, single cluster of servers on eastern time, but gets hit well into the morning, by international clients.</p>
<p>1 db, several web servers, so if no db, simple, wheneve... | <p>If there's truly no good time from the users' perspective, then I'd suggest doing it when your team has the most time to recover from any build-related disaster.</p>
|
Entity Framework - Can you map the result type of an imported stored procedure to a custom entity type? <p>I already have an entity model in a separate dll that contains various objects that I need to use. I don't really want to create or duplicate entities using the EF designer. Instead I would like to configure it so... | <p>There are a couple of options here.</p>
<ol>
<li><p>You can create a "Complex Type" and map that to the procedure result. However, you have to do that in your EDMX; it's not supported by the designer. Read <a href="http://msdn.microsoft.com/en-us/library/bb738472.aspx" rel="nofollow">this article</a> for details.... |
In Classic asp, can I store a database connection in the Session object? <p>Can I store a database connection in the Session object?</p>
| <p>It is generally not recommended to do so, a connection string in the Application variable, with a nice helper function/class is a much preferred method. <strike>Here</strike> is some reference. <em>(Dead link removed because it now leads to a phishy site)</em></p>
|
Integrating with Google Docs <p>Has anyone integrated an "Open in Google Docs" in their web app yet? Gmail has this for opening attachments. How about any other sightings of this in a <em>non-google</em> web app?</p>
| <p>Google Docs does <a href="http://code.google.com/apis/documents/developers_guide_protocol.html" rel="nofollow">have an API</a> which allows you to search, upload, delete and retrieve documents from the Google Docs list of a specific user. You could conceivably use this to upload a document from your server and then... |
What's the easiest way to merge (server-side) a collection of PDF documents into one big PDF document in JAVA <p>I have 3 PDF documents that are generated on the fly by a legacy library that we use, and written to disk. What's the easiest way for my JAVA server code to grab these 3 documents and turn them into one long... | <p>@J D OConal, thanks for the tip, the article you sent me was very outdated, but it did point me towards iText. I found this page that explains how to do exactly what I need:
<a href="http://java-x.blogspot.com/2006/11/merge-pdf-files-with-itext.html" rel="nofollow">http://java-x.blogspot.com/2006/11/merge-pdf-files-... |
SQL Server sys.databases log_reuse_wait question <p>I was investigating the rapid growth of a SQL Server 2005 transaction log when I found that transaction logs will only truncate correctly - if the sys.databases "log_reuse_wait" column is set to 0 - meaning that nothing is keeping the transaction log from reusing exis... | <p>I still don't know why I was seeing the ACTIVE_TRANSACTION in the sys.databases log_reuse_wait_desc column - when there were no transactions running, but my subsequent experience indicates that the log_reuse_wait column for the tempdb changes for reasons that are not very clear, and for my purposes, not very relevan... |
What is your session management strategy for NHibernate in desktop applications? <p>I find it much more difficult to manage your session in a desktop application, because you cannot take advantage of such a clear bondary like HttpContext.
So how do you manage your session lifetime to take advantage of lazy loading but ... | <p>Ayende has recently written <a href="http://msdn.microsoft.com/en-us/magazine/ee819139.aspx">a great article on the subject in MSDN</a>.</p>
|
Good asp.net (C#) apps? <p>Any suggestions for good open source asp.net (C#) apps out there which meet as many of the following:?</p>
<ol>
<li>Designed well and multi tiered</li>
<li>Clean & commented code</li>
<li>Good use of several design patterns</li>
<li>Web pages display properly in all common browsers</li>
... | <p>I would have to agree with <a href="http://www.dotnetblogengine.net/" rel="nofollow">BlogEngine</a>. It implements a ton of different abilities and common needs in asp.net as well as allowing it to be fully customizable and very easy to understand. It can work with XML or SQL (your choice) and has a huge community... |
Word frequency algorithm for natural language processing <p>Without getting a degree in information retrieval, I'd like to know if there exists any algorithms for counting the frequency that words occur in a given body of text. The goal is to get a "general feel" of what people are saying over a set of textual comment... | <p>You'll need not one, but several nice algorithms, along the lines of the following.</p>
<ul>
<li>ignoring pronouns is done via a <a href="http://en.wikipedia.org/wiki/Stoplist">stoplist</a>.</li>
<li>preserving proper nouns? You mean, detecting named entities, like <em>Hoover</em> <em>Dam</em> and saying "it's one ... |
Benefits of SQL Server 2005 over 2000 <p>Could somebody please name a few. I could given time, but this is for somebody else, and I'd also like some community input.</p>
| <p>Some differences:</p>
<ul>
<li>CLR (.NET) stored procedures</li>
<li>SSIS instead of DTS</li>
<li>Management Studio instead of Enterprise Manager, with more functions (2008 version is even better)</li>
<li>VS integration</li>
<li>better replication</li>
<li>SMO and AMO (extensions to handle the server from applicat... |
How can I report to users what is consuming the process address space of a windows application while they're running it? <p>I'm writing the memory manager for an application, as part of a team of twenty-odd coders. We're running out of memory quota and we need to be able to see what's going on, since we only appear to... | <p>You can use existing memory debugging tools for this, I found Memory Validator <a href="http://www.vmvalidator.com/cpp/memory/index.html" rel="nofollow" title="Memory Validator">1</a> quite useful, it is able to track both API level (heap, new...) and OS level (Virtual Memory) allocations and show virtual memory map... |
How to match a single quote in sed <p>How to match a single quote in sed if the expression is enclosed in single quotes:</p>
<pre><code>sed -e '...'
</code></pre>
<p>For example need to match this text:</p>
<pre><code>'foo'
</code></pre>
| <p>You can either use:</p>
<pre><code>"texta'textb" (APOSTROPHE inside QUOTATION MARKs)
</code></pre>
<p>or</p>
<pre><code>'texta'\''textb' (APOSTROPHE text APOSTROPHE, then REVERSE SOLIDUS, APOSTROPHE, then APOSTROPHE more text APOSTROPHE)
</code></pre>
<p>I used unicode character names. REVERSE SOLIDUS is more co... |
Optional Parameters in Mysql stored procedures <p>How do I create an optional parameter in a mysql stored procedure?</p>
| <p>According to <a href="http://bugs.mysql.com/bug.php?id=15975" rel="nofollow">this bug</a>, there is currently no way to create optional parameters.</p>
|
How do I best convert a DbType to System.Type? <p>How do I best convert a System.Data.DbType enumeration value to the corresponding (or at least one of the possible corresponding) System.Type values?</p>
<p>For example:</p>
<pre><code>DbType.StringFixedLength -> System.String
DbType.String -> System.String
DbT... | <p>AFAIK there is no built-in converter in .NET for converting a SqlDbType to a System.Type. But knowing the mapping you can easily roll your own converter ranging from a simple dictionary to more advanced (XML based for extensability) solutions.</p>
<p>The mapping can be found here:
<a href="http://www.carlprothman.n... |
Make Web Application Accessible <p>What things have to be done before I can honestly tell myself my web application is accessible by anyone? Or even better, convince Joe Clark. I don't have any video or audio to worry about, so I know I won't need transcripts. What else do I have to check?</p>
| <p>You should also check out the WAI-ARIA stuff: </p>
<ul>
<li><a href="http://www.w3.org/WAI/intro/aria" rel="nofollow">http://www.w3.org/WAI/intro/aria</a></li>
<li><a href="http://alistapart.com/articles/waiaria" rel="nofollow">http://alistapart.com/articles/waiaria</a></li>
<li><a href="http://juicystudio.com/arti... |
Statistically removing erroneous values <p>We have a application where users enter prices all day. These prices are recorded in a table with a timestamp and then used for producing charts of how the price has moved... Every now and then the user enters a price wrongly (eg. puts in a zero to many or to few) which somewh... | <p>Calculate and track the <a href="http://en.wikipedia.org/wiki/Standard_deviation" rel="nofollow">standard deviation</a> for a while. After you have a decent backlog, you can disregard the outliers by seeing how many standard deviations away they are from the mean. Even better, if you've got the time, you could use t... |
Best solution for using EJBs from Excel <p>We would like to give access to some of our EJBs from Excel. The goal is to give an API usable from VBA.</p>
<p>Our EJBs are mostly Stateless Session Beans that do simple CRUD operations with POJOs.</p>
<p>Some possible solutions: </p>
<ul>
<li>Exposing the EJBs as WebServi... | <p>You could take a look at <a href="http://www.codeproject.com/KB/cs/iiop_net_and_ejb.aspx" rel="nofollow">IIOP.NET</a>, which addresses this issue.</p>
|
Multiple forms on ASP.NET page <p>Coming from a Classic ASP background, I'm used to multiple forms on a page, but this clearly limited in a ASP.NET page.</p>
<p>However, I have a situation where I have a form that gathers input from the user, saves the data to a DB, and afterwards I want to render (and tweak the value... | <p>You can have multiple forms, it's just only one form may have the runat="server" attribute.</p>
<p>There are a bunch of answers to getting paypal to work; but as it's a learning vehicle that may be cheating. In all honesty I'd look at the full blown paypal API rather than use the somewhat simplistic forms method (w... |
How to calculate the sum of values in a tree using SQL <p>I need to sum points on each level earned by a tree of users. Level 1 is the sum of users' points of the users 1 level below the user. Level 2 is the Level 1 points of the users 2 levels below the user, etc...</p>
<p>The calculation happens once a month on a no... | <p>If you were using Oracle DBMS that would be pretty straightforward since Oracle supports tree queries with the <strong>CONNECT BY/STARTS WITH</strong> syntax. For SQL Server I think you might find <a href="http://searchwindevelopment.techtarget.com/tip/0,289483,sid8_gci1277481,00.html" rel="nofollow">Common Table Ex... |
Export variable from C++ static library <p>I have a static library written in C++ and I have a structure describing data format, i.e.<br></p>
<pre><code>struct Format{
long fmtId;
long dataChunkSize;
long headerSize;
Format(long, long, long);
bool operator==(Format const & other) const;
};
</... | <p>Don't use the static keyword on global declarations. <a href="http://msdn.microsoft.com/en-us/library/s1sb61xd.aspx" rel="nofollow">Here is an article explain the visibility of variables with/without static</a>. The static gives globals internal linkage, that is, only visible in the translation unit they are declare... |
source for eclipse plugin.xml page <p>I would like to know where can I find the code which eclipse uses to display the forms in the plugin.xml file. In particular I am looking for the form layout used in the extension tab in the plugin.xml</p>
| <p>Unfortunately, Eclipse's plugin search doesn't work for referenced plugins. To do these searches I created a workspace that contains all the plugins from my eclipse install as source folders. I just open the workspace and perform my plugin search there. Just open the search dialog and choose plugin.</p>
|
When people talk about scaling a website with 'shards', what do they mean? <p>I have heard the 'shard' technique mentioned several times with regard to solving scaling problems for large websites. What is this 'shard' technique and why is it so good?</p>
| <p>Karl Seguin has a <a href="http://codebetter.com/blogs/karlseguin/archive/2008/06/30/scale-cheaply-sharding.aspx" rel="nofollow">good blog</a> post about sharding.</p>
<p>From the post:</p>
<blockquote>
<p>Sharding is the separation of your
data across multiple servers. How you
separate your data is up to yo... |
Order SharePoint search results by more columns <p>I'm using a FullTextSqlQuery in SharePoint 2007 (MOSS) and need to order the results by two columns:</p>
<pre><code>SELECT WorkId FROM SCOPE() ORDER BY Author ASC, Rank DESC
</code></pre>
<p>However it seems that only the first column from ORDER BY is taken into acco... | <p>Microsoft <em>finally</em> posted a knowledge base article about this issue.</p>
<p>"When using RANK in the ORDER BY clause of a SharePoint Search query, no other properties should be used"</p>
<p><a href="http://support.microsoft.com/kb/970830" rel="nofollow">http://support.microsoft.com/kb/970830</a></p>
<p>Sym... |
Is there a pretty printer for python data? <p>Working with python interactively, it's sometimes necessary to display a result which is some arbitrarily complex data structure (like lists with embedded lists, etc.)
The default way to display them is just one massive linear dump which just wraps over and over and you hav... | <pre><code>from pprint import pprint
a = [0, 1, ['a', 'b', 'c'], 2, 3, 4]
pprint(a)
</code></pre>
<p>Note that for a short list like my example, pprint will in fact print it all on one line. However, for more complex structures it does a pretty good job of pretty printing data.</p>
|
Multi tenant architecture and NHibernate <p>Could anyone explain me finally what is the best strategy to implement transparent and fluent support of multi-tenant functionality in NHibernate powered domain model?</p>
<p>Im looking for the way, how to keep the domain logic as isolated as possible from the multi-tenant ... | <p>The simplest approach is to use different databases for each client.</p>
<p>Implementing multi-tenanting in this manner allows you to effectively write a single tenant application and only worry about the multi-tenanting at the point where you create / retrieve the session.</p>
<p>I haven't delved deep into the de... |
Reading quicken data files <p>Looking for an open source library, for C++, Java, C# or Python, for reading the data from Quicken <strong>.qdf</strong> files.</p>
<p>@<a href="#91941">Swati</a>: Quicken <strong>.qif</strong> format is for transfer only and is not kept up to date by the application like the .qdf file ... | <p>QDF is proprietary and not really meant for reading other than my Quicken, probably for a reason as it is messy. </p>
<p>I would recommend finding a way to export the qdf into an OFX (Open Financial Exchange) or qif file. I have done some financial and quickbooks automation and I did something similar. The probl... |
Is it possible to set code behind a resource dictionary in WPF for event handling? <p>Is it possible to set code behind a resource dictionary in WPF. For example in a usercontrol for a button you declare it in XAML. The event handling code for the button click is done in the code file behind the control. If I was to cr... | <p>I think what you're asking is you want a code-behind file for a ResourceDictionary. You can totally do this! In fact, you do it the same way as for a Window:</p>
<p>Say you have a ResourceDictionary called MyResourceDictionary. In your MyResourceDictionary.xaml file, put the x:Class attribute in the root element, l... |
Python, beyond the basics <p>I've gotten to grips with the basics of Python and I've got a small holiday which I want to use some of to learn a little more Python. The problem is that I have no idea what to learn or where to start. I'm primarily web development but in this case I don't know how much difference it will ... | <p>Well, there are great ressources for advanced Python programming :</p>
<ul>
<li>Dive Into Python (<a href="http://www.diveintopython.net/">read it for free</a>)</li>
<li>Online python cookbooks (e.g. <a href="http://code.activestate.com/recipes/langs/python/">here</a> and <a href="http://the.taoofmac.com/space/Pyth... |
How to make visualstudio .net work with VB6 and service pack 6 <p>I have VB application that requires visual service pack 6 to run , now when I install visualstudio.net (any version of .net) Its debugger doesn't work properly ,I am able to create windows/web application in visualstudio.net but not able to debug anythi... | <p>I've used visual studio 6 and visual studio 2005 on the same system, so I know you can set it up so that both debuggers work. However, when I did it the setup just worked, so I can't tell you what I did to make it work, except that VS2005 was on the machine first.</p>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.