instruction stringlengths 0 30k ⌀ |
|---|
As two people already said, SQL Profiler is the tool to use for that. I don't want to be an echo but I wanted to elaborate a bit more in detail: Not only does it provide the actual timings from SQL Server (as opposed to timing from the app-side where network i/o, connection and connection pool timings are added to the ... |
My VBA skills are a little rusty, but this is the general idea of what I'd do.
The easiest way to do this would be to iterate through a loop for every column:
public sub CellProcessing()
on error goto errHandler
dim MAX_ROW as Integer 'how many rows in the spreadsheet
dim i as I... |
You can do that with gacutil.exe. It is located in:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
It is only there though, if you installed the .NET SDK (not just the .Net Redistributible).
But you can copy it from your developer machine. |
how do you search for files containing dos line endings (CRLF) with grep under linux? |
|grep|bash|newline|linux| |
something like
`grep -IUr --color '\r\n' .`
the above seems to match for literal 'rn' which is not what is desired
the output of this will be piped through xargs into todos to convert crlf to lf |
|linux|bash|grep|newline| |
something like
`grep -IUr --color '\r\n' .`
the above seems to match for literal 'rn' which is not what is desired
the output of this will be piped through xargs into todos to convert crlf to lf like this
`grep -IUrl --color '^M' . | xargs -ifile fromdos 'file'` |
I'm using Visual Studio 2008 (but I believe this answer applies to Visual Studio 2005).
Select Tools -> Options.
Navigate to the "Text Editor" node and expand it.
Expand "All Languages" (or whatever language you want to apply this to) and check the "Apply Cut or Copy commands to blank lines when there is no ... |
The reason you couldn't find it is because it's not there. Unless you have the original proc, you're going to have to call the company.
Granted, you could take a stab at creating the proc, yourself. But why bother when somebody already has the original proc?
Is this a fresh install of the commercial product? I... |
It is possible to manually identify a file located within a repository as *binary* by using **svn propset** to set the **svn:mime-type** property to a binary type, such as **application/octet-stream**. This is generally not necessary, as Subversion will attempt to determine whether a file is binary when the file is fi... |
Are you on Windows and did you rename a file to the same name with different case (e.g. MAKEFILE vs Makefile vs makefile)? CVS used to have a problem with this (and maybe still does?):
OSDir/mailarchive - [Subject: Re: hash.c.312: findnode:](http://osdir.com/ml/version-control.cvs.bugs/2003-01/msg00092.html)
... |
Why are Python's 'private' methods not actually private? |
|python|encapsulation|information-hiding| |
Python gives us the ability to create 'private' methods and variables within a class by prepending double underscores to the name, like so: *__myPrivateMethod()*. How, then, can one explain this
<pre><code>>>> class MyClass:
... def myPublicMethod(self):
... print 'public method'
... def __myP... |
Python gives us the ability to create 'private' methods and variables within a class by prepending double underscores to the name, like so: *__myPrivateMethod()*. How, then, can one explain this
<pre><code>>>> class MyClass:
... def myPublicMethod(self):
... print 'public method'
... def __myP... |
We've been experimenting with LINQ in a clustered environment and it appears to be scaling well on the individual machines and across the cluster. Of the 3 options that you've provided I would say that LINQ is the better choice although each option has a slightly different target audience so you should define what you ... |
If you are talking about relational databases, then my vote is for encapsulating all of your data operations in stored procedures, regardless of how you access them from the other layers.
If you disable all read/write access to the database, except via stored procedures, you can hide your data model behind well defi... |
The document in question discusses the Solaris threading model and how the VM maps to it. This has nothing to do with Linux. Also, the document discusses performance only. The program's overall behaviour should not change no matter what you choose.
Java's exposed threading model is the same on every platform and def... |
Perforce and TFS are the only options that I know of. I know that both of them have been used on large scale projects within Microsoft. Vault *may* scale that big, but I don't know if it goes beyond 500-1000 users. |
I'm haven't used Java too much, but based on the [white paper from 1984][1], it should be a fairly straightforward mapping of render state blend modes.
There are of course more that you can do than just these, like normal alpha blending (SourceAlpha, InvSourceAlpha) or additive (One, One) to name a few. *(I assume t... |
Why can't you / don't want to use the LD_PRELOAD trick?
Example code here:
/*
* File: soft_atimes.c
* Author: D.J. Capelis
*
* Compile:
* gcc -fPIC -c -o soft_atimes.o soft_atimes.c
* gcc -shared -o soft_atimes.so soft_atimes.o -ldl
*
* Use:
* LD_PRELOAD="... |
if you're asked to assign something to *this*, there's quite a few examples. One that comes to mind is telling a control who his daddy is:
class frmMain
{
void InitializeComponents()
{
btnOK = new Button();
btnOK.Parent = this;
}
}
|
Here's the idiom I like for making functionality identical to 'sprintf', but returning a std::string, and immune to buffer overflow problems. This code is part of an open source project that I'm writing (BSD license), so everybody feel free to use this as you wish.
#include <string>
#include <cstdarg>
... |
|sql-server|unit-testing|resharper| |
I've started seeing this message intermittently for a few of the unit tests in my application (there are over 1100 unit & system tests). I'm using the test runner in ReSharper 4.1. |
|sql-server|unit-testing|resharper|vmware-tools| |
I've started seeing this message intermittently for a few of the unit tests in my application (there are over 1100 unit & system tests). I'm using the test runner in ReSharper 4.1.
One other thing: my development machine is a VMWare virtual machine. |
What are the best solutions for flash charts and graphs? |
|flash|graph| |
I'm aware of [FusionCharts](http://www.fusioncharts.com/), are there other good ones? |
|flash|graph| |
How best to use File Version and Assembly Version |
|.net|attributes|version| |
In .Net there are two version numbers available when building a project, File Version and Assembly Version. How are you using these numbers? Keeping the them the same? Auto-incrementing one, but manually changing the other?
Also what about the AssemblyInformationalVersion attribute?
I'd found this support KB... |
|.net|attributes|versions| |
Is there a Box Plot graph avalible for Reporting Services 2005? |
|sql|reporting-services|graph| |
Is there a [Box Plot][1] graph, or box and whisker graph available for Reporting Services 2005? From the looks of the documentation there doesn't seem to be one out of the box; so I am wondering if there is a third party that has the graph, or a way to build my own?
[1]: http://en.wikipedia.org/wiki/Box_plot |
|sql|reporting-services|graph| |
Displaying Version Information in a Web Service |
|vb.net|webservices|version| |
Can anyone suggest a way of getting version information into a Web Service. (VB.NET)
I would like to dynamically use the assembly version in the title or description, but the attributes require constants.
Is manually writing the version info as a string the only way of displaying the information on the .asmx pag... |
|vb.net|web-services|version| |
|vb.net|web-services|versions| |
Getting the subversion repository number into code... |
int n = 10; // Take first 10 that meet criteria
int[] ia = Enumerable.Range(0,999).Where(a => a % 3 == 0 && a.ToString()[0] == '9').Take(n).ToArray();
|
int n = 10; // Take first 10 that meet criteria
int[] ia = Enumerable
.Range(0,999)
.Where(a => a % 3 == 0 && a.ToString()[0] == '9')
.Take(n)
.ToArray();
|
Good ways to Learn Cocoa? |
|cocoa| |
I'd love to learn Cocoa, it seems like the best systems language for Mac OS X.
Can you recommend any useful ways to learn the language? Books, websites, example projects or even classes to take? |
Use disable-output-escaping="yes" in your value-of tag |
Is there any way to pass a structure type to a c function |
|c| |
I have some code with multiple very similar functions to look up an item in a list based on the contents of one field in a structure. The only difference between the functions is the type of the structure that the lookup is occurring in. If I could pass in the type, I could remove all the code duplication. |
I have some code with multiple very similar functions to look up an item in a list based on the contents of one field in a structure. The only difference between the functions is the type of the structure that the lookup is occurring in. If I could pass in the type, I could remove all the code duplication.
*edit* ... |
If I had to guess, the NetworkStream does consider the data to have been sent once it hands the buffer off to the Windows Socket. So, I'm not sure there's a way to accomplish what you want via TcpClient. |
If I had to guess, the NetworkStream considers the data to have been sent once it hands the buffer off to the Windows Socket. So, I'm not sure there's a way to accomplish what you want via TcpClient. |
At the moment there is no port. However, DeepZoom is based on the technology found in the "World Wide Telescope" and the "Microsoft Photo Synth", so they have desktop versions of the technology running. I guess it would be safe to assume that Microsoft will be releasing a multi scale image control for WPF soon. If you ... |
try:
<xsl:value-of select="&amp;" disable-output-escaping="yes"/>
Sorry if the formatting is messed up. |
I just Googled it. :)
http://bugs.sakaiproject.org/confluence/display/BOOT/Setting+Up+Tomcat+For+Remote+Debugging
Many more on google.
Effectively, set your JPDA settings:
set JPDA_ADDRESS=8000
set JPDA_TRANSPORT=dt_socket
bin/catalina.bat jpda start
Then, in Eclipse, Run->Debug Configurations...->Remot... |
What is a valid value for id attributes in html |
|html|jquery| |
When creating id attributes for html elements what rules are there for the value? |
Selenium might be what you're looking for: http://selenium.openqa.org/
It allows you to script actions and evaluate the results. It's open-source (Apache 2.0), cross platform, and has nice tools. |
Its just one of those language design choices. On some level they are justified. They make it so you need to go pretty far out of your way to try and call the method, and if you really need it that badly, you must have a pretty good reason! Debugging hooks and testing come to mind as possible applications, used respons... |
There are some screencasts on [http://showmedo.com][1]
[1]: http://showmedo.com |
I would recommend [zedgraph][1]
[1]: http://zedgraph.org/wiki/index.php?title=Main_Page |
From the [HTML 4 specification][1]:
> ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
A common mistake is to use an ID that starts with a digit.
[1]: http://www.w3.org/TR/ht... |
I would recommend trying <a href="http://cream.sourceforge.net/index.html">Cream</a>.
<p> Cream is a set of scripts and add-ons that sit on top of gVim. Cream doesn't change the appearance of gVim, but it does change the way it behaves.</p>
<p>One of those behaviours is a tabbed document interface. Other behaviours a... |
In what language? In C++ for example the constructors can not be virtual. |
You can use an XSL stylesheet to merge your stylesheets. However, this is equivalent to using the xsl:include element, not xsl:import (as Azat Razetdinov has already pointed out). You can read up on the difference [here](http://www.w3.org/TR/xslt#section-Combining-Stylesheets).
Therefore you should first replace the... |
Problem with Login control of ASP.NET |
|asp.net| |
I set up a website to use SqlMembershipProvider as written on [this page][1].
I followed every step. I have the database, I modified the Web.config to use this provider, with the correct connection string, and the authentication mode is set to Forms. Created some users to test with.
I created a Login.aspx and put... |
I set up a website to use SqlMembershipProvider as written on [this page][1].
I followed every step. I have the database, I modified the Web.config to use this provider, with the correct connection string, and the authentication mode is set to Forms. Created some users to test with.
I created a Login.aspx and put... |
The following might be an alternative solution:
void A::printto(ostream outputstream) {
char buffer[100];
string s = "stuff";
sprintf(buffer, "some %s", s);
outputstream << buffer << endl;
b.printto(outputstream);
}
(`B::printto` similar), and define
vo... |
:q -> quit
:w -> save
:q! -> quit and don't save
:x -> save and quit
:[number] -> go to line number
G -> go to end of file
dd -> delete line
p -> "put" line
yy -> "copy" line
:s/[searchfor] -> search
I guess those are the basic one to start from |
How do you do paged lists in Java Server Faces? |
For the CSV Part, you may use my little open source library
http://developer.berlios.de/projects/java-csv/ |
Specifying filename for dynamic PDF in asp.net |
|c#|asp.net|response| |
How can I specify the filename when dumping data into the response stream?
Right now I'm doing the following:
byte[] data= GetFoo();
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(data);
Response.End();
With the ... |
There is no command prompt style console on Windows Mobile. If you're really after a command prompt, check out www.pocketdos.com for a high level of dos application compatibility.
If you're more interested in writing small applications for Windows Mobile, C# or VB.Net are your best choices.
On small mobile devices l... |
To get round some of the issues/problems that have ben highlighted I would suggest converting the string to lower case first and then call the ToTitleCase method. You could then use IndexOf(" Mc") or IndexOf(" O\'") to determine sepcial cases that need more specic attention.
inputString = inputString.ToLower();
... |
So if i understand currenctly, you need to look if one date is bigger than the other.
function ValidRange(date1,date2)
{
return date2.getTime() > date1.getTime();
}
You then need to parse the strings you are getting from the UI, with Date.parse, like this:
ValidRange(Date.parse('10-10... |
Using strings for concatenation can lead to a runtime complexity on the order of O(n^2).
If you use a StringBuilder, there is a lot less copying of memory that has to be done. With the StringBuilder(int capacity) you can increase performance if you can estimate how large the final String is going to be. Even if yo... |
You may want to check related SO question:
- [How do you clear the transaction log in a SQL Server 2005 database?][1]
[1]: http://stackoverflow.com/questions/56628/how-do-you-clear-the-transaction-log-in-a-sql-server-2005-database#63070 |
The .NET Framework does not contain the ability to modify/create PDFs. You need a 3rd party component to accomplish what you are looking for. |
Convert to La\*b\* (aka just plain "Lab", and you'll also see reference to "CIELAB"). A good quick measaure of color difference is
> (L1-L2)^2 + (a1-a2)^2 + (b1-b2)^2
Color scientists have other more refined measures, which may not be worth the bother, depending on accuracy needed for what you're doing.
The... |
Unit tests are really useful when you refactor your code (ie. completely rewrite or move a module). As long as you have unit tests before you do the big changes, you'll have confidence that you havent forgotten to move or include something when you finish.
|
How to make a Side-by-Side Compiler for .NET |
|.net|compiler-theory|language-design| |
Nikhil Kothari's [Script#][1] is quite possibly one of the most amazing concepts I've seen in the JavaScript arena for quite some time. This question isn't about JavaScript, but rather about language compilation in the .NET runtime.
I've been rather interested in how, using the .NET platform, one can write a compile... |
|.net|language-design|compiler-theory| |
Nikhil Kothari's [Script#][1] is quite possibly one of the most amazing concepts I've seen in the JavaScript arena for quite some time. This question isn't about JavaScript, but rather about language compilation in the .NET runtime.
I've been rather interested in how, using the .NET platform, one can write a compile... |
How best to copy entire databases in MS SQL Server? |
The traditional approach says that your client code should use a wrapper, which is responsible for instantiating the COM object. This wrapper can then be easily mocked.
Because you've got parts of your code instantiating the COM objects directly, this doesn't really fit. If you can change that code, you could use th... |
Using setTimeout can work quite well, although when it's executed is up to the browser. If you pass zero as the timeout time, the browser will execute when things are "settled".
The good thing about this is that you can have many of them, and don't have to worry about chaining onLoad events.
setTimeout(myFunc... |
If you're a beginner, try my book [A Byte of Python](http://www.swaroopch.com/notes/Python).
If you're already experienced in programming, try [Dive Into Python](http://www.diveintopython.org). |