instruction stringlengths 0 30k ⌀ |
|---|
You can always try integrating SourceSafe with SQL Server. Here's a quick start : [link][1] . To work with it you've got to have Managment Studio Developers Edition.
[1]: http://msdn.microsoft.com/en-us/library/ms181089(VS.80).aspx |
There was a similar discussion here recently, for the question [What are advantages of bytecode over native code?][1]. You can find interesting answers in that thread.
[1]: http://stackoverflow.com/questions/48144/what-are-advantages-of-bytecode-over-native-code |
Please see some of the open source applications at http://www.eclipse.org/community/rcp.php before opining that RCP is only for building a text editor. Thanks. |
You can open a spreadsheet in a single line:
Workbooks.Open FileName:="\\the\share\file.xls"
and refer to it as the active workbook:
Range("A1").value = "New value"
|
If you're not familiar with valgrind or similar, then to add to @Jordi Bunster's answer...
When you've had profiling on in Xdebug, you can open the dumped profile files in KCacheGrind or WinCacheGrind to get a graphical view of what is taking the time in your code.
Fortunately the xdebug documentation also expla... |
We have a similar issue on a project I am working on. There is data that is _pretty much_ static, but is open to change..
What I ended up doing is saving the data to a local file and then monitoring it for changes. The DB server is then never hit unless we remove the file, in which case it will scoot of to the DB an... |
Find all drive letters in Java |
|java|windows| |
For a project I'm working on. I need to look for an executable on the filesystem. For UNIX derivatives, I assume the user has the file in the mighty $PATH variable, but there is no such thing on Windows.
I can safely assume the file is at most 2 levels deep into the filesystem, but I don't know on what drive it will... |
For a project I'm working on. I need to look for an executable on the filesystem. For UNIX derivatives, I assume the user has the file in the mighty $PATH variable, but there is no such thing on Windows.
I can safely assume the file is at most 2 levels deep into the filesystem, but I don't know on what drive it will... |
|ruby|macos| |
Are you trying to implement a client to a web service hosted somewhere else? If so, Java's not necessary. You can do web service clients in [.NET][1], [PHP][2], [Ruby][3], or pretty much any modern web technology out there. All you need is a WSDL document to provide metadata about how to invoke the services.
... |
Best way to draw text with OpenGL and Cocoa? |
|cocoa|opengl| |
Does anyone know an easy way to draw arbitrary text in a Cocoa NSOpenGLView? I have a couple of constraints.
- The text on screen may change from frame to frame (for example, a framerate display in the corner)
- I would like to be able to select any font installed on the system at any size
|
is it a gem? Are you doing
require 'rubygems'
require 'optiflag'
or equivalent?
|
To follow up with jodonnell's comment, a Web service connection can be made in just about any server-side language. It is just that the API example they provided was in Java probably because PlanPlusOnline is written in Java. If you have a URL for the service, and an access key, then all you really need to do is figure... |
2 choices:
1. Write out the messy form from the login page, and JavaScript form.submit() it to the page.
2. Have the login page itself POST to the requesting page (with the previous values), and have that page's controller perform the login verification. Roll this into whatever logic you already have for detectin... |
Hibernate crops clob values oddly |
|java|oracle-database|hibernate| |
I have a one to many relationship between two tables. The many table contains a clob column. The clob column looks like this in hibernate:
@CollectionOfElements(fetch = EAGER)
@JoinTable(name = NOTE_JOIN_TABLE, joinColumns = @JoinColumn(name = "note"))
@Column(name = "substitution")
@IndexColumn(name = "listI... |
Custom cursor in WPF? |
|wpf| |
I want to use an image or icon as a custom cursor in WPF app. What's the best way to do it? |
|.net|wpf| |
The semantics of C# differs slightly from Java here. In C# assignment in declaration is performed before calling the superclass constructor. In Java it is done immediately after which allows 'this' to be used (particularly useful for anonymous inner classes), and means that the semantics of the two forms really do matc... |
Nope.
But you can create a special page to stream that image out. First, you set the URL of the image to the page that performs the streaming, including some url parameters that let you know where to get the image:
<img src="GetImage.aspx?filename=foo" ... />
in GetImage.aspx, you get the filename (or... |
I've used [YourKit Java Profiler 7.5][1] and was reasonably happy with it. Java has some pretty good tools included with recent releases that are worth looking into. (e.g., `jmap -histo <pid>`)
[1]: http://www.yourkit.com/ |
The reason it's not in limits.h is that it's not a quantity giving the limits of the value range of an integral type based on bit width on the current architecture. That's the role assigned to limits.h by the ISO standard.
The value in which you're interested is not hardware-bound in practice and can vary from plat... |
You need to take this issue to the software developer. |
$( document ).ready( function() {
$( "input[name='area']" ).bind( "click", radioClicks )
});
function radioClicks()
{
alert( $( this ).val() );
}
I like to use bind() instead of directly wiring the event handler because you can pass additiona... |
The most obvious difference between signed and unsigned assemblies is in a ClickOnce application. If you don't sign it, then users will get a scary "Unknown Publisher" warning dialog the first time they run your application. If you've signed it with a **certificate from a trusted authority**, then they see a dialog tha... |
Choosing between AJAX, Flex and Silverlight |
|untagged| |
AJAX, Flex and Silverlight are a few ways to make more interactive web applications. What kinds of factors would you consider when deciding which to use for a new web app? Does any one of them offer better cross-platform compatibility, performance, developer tools or community support? |
Use a nested class when the class you are nesting is only useful to the enclosing class. For instance, nested classes allow you to write something like (simplified):
public class SortedMap {
private static class TreeNode {
TreeNode left;
TreeNode right;
}
}
You... |
Along the same line of not looking for a religious war (but go ahead and downvote me if you feel you must), why do you feel that the only option to vi is emacs? Is it the OS you develop on, or just the options you explored?
The Java development landscape enjoys some of the best IDEs these days (both free and paid f... |
And if you just want to create the constraint on its own, you can use ALTER TABLE
alter table MyTable
add constraint MyTable_MyColumn_FK FOREIGN KEY ( MyColumn ) references MyOtherTable.PKColumn
I would recommend the syntax mentioned by Sara Chipps for inline creation, just because I would rather name my... |
I know that you specificity ask for a framework but I thought I would let you know about what I get up to here. I have just undergone converting my company's web application from a custom in-house ORM layer into sqlAlchemy so I am far from an expert but something that occurred to me was that sqlAlchemy has types for al... |
There's the method_missing method. You could implement that in your Application Controller and catch all missing actions, maybe logging those and redirecting to the index action of the relevant controller. This approach would ignore everything that can't be routed to a controller, which is pretty close to what you want... |
One word: Lunch |
It may also be worth adding that if you need to specifically use POST rather than SOAP then you can configure the web service to receive POST calls:
Check out the page on MSDN:
[Configuration Options for XML Web Services Created Using ASP.NET][1]
[1]: http://msdn.microsoft.com/en-us/library/aa719747(VS.71).aspx |
@iAn's solution looks good to me. The only thing I'd change is instead of using setTimeout, I'd try and hook into the images 'Load' event. This way, if the image takes longer than 3 seconds to download, you'll still get the spinner.
On the other hand, if it takes less time to download, you'll get the spinner for l... |
Knowledge Transfer and Knowledge Management have one drawback. They seem to cost an aweful lot: if everybody knows what I know, am I still needed? All the time I use to bring others up to speed. What do I gain from it?
The best way to go about this is to be an example. Share your knowlewdge, in a wiki, blog about it... |
What is the quickest way to a very simple blog? |
|django|blogs| |
I am about to start a new project and would like to document its development in a very simple blog. While today blog is a species in its own right and there's a ton of blog engines, technically there isn't really much to it, right?
I don't want to review a couple of blog engines and I would like to avoid a learning ... |
I am about to start a new project and would like to document its development in a very simple blog. My requirements are:
- self-hosted on my Gentoo-based LAMP stack
- Integration in a django based website (i. e. the blog should be one of the pages on the site)
- very little or no learning curve <i>that's spe... |
Missing info from your question:
1. Where do you run screen and see this issue? Some terminal app (KTerminal, Gnome terminal, virtual console etc) or remote session (eg putty, ssh from another computer)
2. do a “echo $TERM” and tell us its output
3. do a “cat -v”, press Shift-Enter, then Enter, then Ctrl-D and ... |
You're making this a little more complicated than it has to be. Let's start with the end of your example:
String parameterString = "";
if ( condition ) parameterString = appendWithDelimiter( parameterString, "elementName", "," );
if ( anotherCondition ) parameterString = appendWithDelimiter( paramete... |
If you can use php-scripts on the server i would recommend [phpmyadmin][1]. Then you can do this from the web-interface.
[1]: http://www.phpmyadmin.net/home_page/index.php |
You should check out [PHPMyAdmin][1], it is a php based MySQL administration tool. It supports backups and recovery for the database as well as a 'GUI' to the database server. It works very well.
[1]: http://phpmyadmin.sourceforge.net |
If you do not use the transaction logs for restores (i.e. You only ever do full backups), you can set Recovery Mode to "Simple", and the transaction log will very shortly shrink and never fill up again.
If you are using SQL 7 or 2000, you can enable "truncate log on checkpoint" in the database options tab. This has... |
I'm pretty sure [phpMyAdmin][1] will [do this for you][2].
[1]: http://www.phpmyadmin.net/
[2]: http://www.phpmyadmin.net/documentation/#faqexport |
After you have learned the basics, study the "Gang of four" design patterns book.
http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1221488916&sr=8-1
This is a classic, and a must read for any coder who wants to understand how to us... |
The video from Josh Bloch mentioned by yrp is a classic - I second that recommendation.
Some general guidelines:
1. DO define your API primarily in terms of interfaces, factories, and builders.
1. DO clearly specify exactly which packages and classes are part of the API.
1. DO provide a jar specifically us... |
You might be interested in [MSDeploy][1]. [Here's][2] a Scott Hanselman post on this. It's only available as a technical preview at the moment (September 2008) but is worth evaluating against your requirements.
[1]: http://blogs.iis.net/msdeploy/archive/2008/01/22/welcome-to-the-web-deployment-team-blog.aspx
... |
How do you check what version of SQL Server for a database using TSQL? |
|sql-server|database|t-sql| |
Is there a system stored procedure to get the version #? |
Well, assuming the two cases are as follows (to avoid compiler errors):
char str1[32] = "\0";
char str2[32] = "";
As people have stated, str1 is initialized with two null characters:
char str1[32] = {'\0','\0'};
char str2[32] = {'\0'};
However, according to both the C and C++ standard, if ... |
Is it feasible to support multiple applications of the same type that are all written in different languages? |
|multiple|languages|support| |
As much as we would all like to say it is a benefit to programmers to be language agnostic, is it really feasible to support multiple enterprise Web applications of the same type all written in different languages? Think about how complicated a CMS or e-commerce system can be -- now imagine supporting three different C... |
|support|multilingual| |
It might be worth it to add a class to those `<a>` tags and then add another declaration to remove the background:
div.post .text a.noimage{
background:none;
} |
SELECT @@VERSION |
Aside from the file system access (where CLR procs has a very pronounced advantage) I would use T-SQL procs. If you have especially complex calculations you could possibly put that piece into a CLR **function** and call this from within your proc (udf's are where I've found the CLR integration really shines). Then yo... |
Brownfield vs Greenfield development? |
|project|lifecycle| |
This is not a question with a precise answer (strictly speaking the answer would be best captured by a poll, but that functionality is not available), but I am genuinely interested in the answer, so I will ask it anyway.
Over the course of your career, how much time have you spent on [greenfield][1] development comp... |
|projects|lifecycle| |
Using a wiki as a central development project repository |
|svn|wiki|integration|bugzilla|project| |
I have played with the idea of using a wiki (MediaWiki) to centralize all project information for a development project. This was done using extensions that pull information from SVN (using [SVNKit][1]) and by linking to Bugzilla to extract work assigned to a developer or work remaining for a release.
Examples:
... |
|svn|project|wiki|integration|bugzilla| |
I have played with the idea of using a wiki (MediaWiki) to centralize all project information for a development project. This was done using extensions that pull information from SVN (using [SVNKit][1]) and by linking to Bugzilla to extract work assigned to a developer or work remaining for a release.
Examples:
... |
|svn|wiki|projects|integration|bugzilla| |
Visual Studio Setup Project Custom Dialog |
|.net|project|installation|visual|studio|msi| |
I have created a custom dialog for Visual Studio Setup Project using the steps described here:
[http://www.codeproject.com/KB/install/vsSetupCustomDialogs.aspx?fid=419622&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2640482&fr=26][1]
[1]: http://www.codeproject.com/KB/install/vsSetupCustomDialogs.aspx?f... |
I know that you specificity ask for a framework but I thought I would let you know about what I get up to here. I have just undergone converting my company's web application from a custom in-house ORM layer into sqlAlchemy so I am far from an expert but something that occurred to me was that sqlAlchemy has types for al... |
I know that you specificity ask for a framework but I thought I would let you know about what I get up to here. I have just undergone converting my company's web application from a custom in-house ORM layer into sqlAlchemy so I am far from an expert but something that occurred to me was that sqlAlchemy has types for al... |
I have done this frequently over the last 5 years...
You could create an Empty Website, or even create a standard (.NET) website and simply delete the default stuff it generates (web.config etc). Note: create a website, creates a solution and adds a website project within it, which is arguably slightly more preferab... |
I found the following code in the Google Gears code, [here][1]. I copied the functions I think you need to here. The one you need is at the bottom (GetHtmlWindow2), but the other two are needed as well. Hopefully I didn't miss anything, but if I did the stuff you need is probably at the link.
#ifdef WINCE
/... |
This
select 'insert into table table_name (field1, field2) values'
|| table_name.field1 || ', ' || table_field2 || ');'
from table_name
should get you started. Replace || with the string concatenation operator for your db flavour. If field1 or field2 are strings you will have to come up wit... |
You'll have to loop over the set of columns and check each one. You should be able to get a list of all columns with a DESCRIBE table command.
Pseudo-code:
<pre><code>
foreach $column ($cols) {
query("SELECT count(*) FROM table WHERE $column IS NOT NULL")
if($result is zero) {
# $column contai... |
Absolutely yes for tons of good reasons already said above. And one more is that if your code need to be checked by an assesor (for safety and dependability issues), it is pretty better if the code is human redeable. If not, the assessor will refuse to assess it and your project will be refected by authorities. The onl... |
@coldFlame: IIRC you can use `call_user_func(array($className, 'someStaticMethod')` and `call_user_func_array()` to pass params |
You can place your Helper in the Application State. Do this in global.asax:
void Application_Start(object sender, EventArgs e)
{
Application.Add("MyHelper", new MyHelperClass());
}
You can use the Helper that way:
MyHelperClass helper = (MyHelperClass)HttpContext.Current.Ap... |
You can place your Helper in the Application State. Do this in global.asax:
void Application_Start(object sender, EventArgs e)
{
Application.Add("MyHelper", new MyHelperClass());
}
You can use the Helper that way:
MyHelperClass helper = (MyHelperClass)HttpContext.Current.Ap... |
I agree with the previous post that set-based operations will typically perform better, but if you do need to iterate over the rows here's the approach I would take:
1. Add a new field to your table variable (Data Type Bit, default 0)
2. Insert your data
3. Select the Top 1 Row where fUsed = 0 *(Note: fUsed is ... |
I am about to start a new project and would like to document its development in a very simple blog.
My requirements are:
- self-hosted on my Gentoo-based LAMP stack (that seems to rule out blogger)
- Integration in a django based website (as in www.myproject.com/about, www.myproject.com/blog etc rather than ... |
Ubuntu server has PAE enabled in the kernel, the desktop version does not have this feature enabled by default.
This explains, by the way, why Ubuntu server does not work in some hardware emulators whereas the desktop edition does |
Where did all the java applets go? |
|java|history| |
When java was young, people were excited about writing applets. They were cool and popular, for a little while. Now, I never see them anymore. Instead we have flash, javascript, and a plethora of other web app-building technologies.
Why don't sites use java applets anymore?
I'm also curious: historically, why ... |
Almost everything about .Net licensing is explained [here][1]. No need to rewrite, I think.
It is better to exclude license files from project in source control, if you can. Otherwise, editing visual components may be pain in the ass. Also, storing license files in source control repository is not a need.
Hope th... |
Had the same problem with an Apache/JBoss configuration
look at your httpd.conf, you should have three lines:
SSLCertificateFile /usr/local/ssl/crt/public.crt
SSLCertificateKeyFile /usr/local/ssl/private/private.key
SSLCACertificateFile /usr/local/ssl/crt/EV_intermediate.crt
The last line is needed b... |
1) There might not be that much data available to read (the other end of the pipe might not have sent that much data yet), and the implementing class might be non-blocking (i.e. it will just return what it can, rather than waiting for enough data to fulfil the request).
I don't know if any implementations actually b... |