instruction stringlengths 0 30k ⌀ |
|---|
Any information on how to display the ODBC connections dialog and get the chosen ODBC back? |
You don't have to be stuck to your terminal's default 16 (or fewer) colours. Modern terminals will support 256 colours (which will get you pretty close to your GUI look).
Unfortunately, getting your terminal to support 256 colours is the tricky part, and varies from term to term. [This page](http://www.xvx.ca/~awg/e... |
Use this instead:
<link href="~/Content/Site.css" rel="stylesheet" type="text/css" /> |
Depending on the complexity of your graph, simply generating a command file for <a href="http://www.gnuplot.info/">Gnuplot</a>—or <a href="http://www.graphviz.org/">GraphViz/Dotty</a>, depending on what kind of graph you are referring to—might do the trick? |
Does the exe you get out of obfuscation programs vary in speed? |
|obfuscation| |
There are a number of obfuscation programs out there for .Net and I've tried one, my exe seems much slower when obfuscated. Do all obfuscation programs have the same effect or have I chosen a bad one? I'm hoping some are better than others, if you know of a fast one let me know.
Cheers |
|.net|obfuscation| |
Don't store the libraries; they're not strictly speaking part of your project and uselessy take up room in your revision control system. Do, however, use [maven][1] (or [Ivy][2] for ant builds) to keep track of what versions of external libraries your project uses. You should run a mirror of the repo within your organi... |
It sounds like the webkit rendering engine of Safari is not at first recognizing the content change, at least not fully enough to remove the previous html content. Minimizing and then restoring the windows initiates a redraw event in the browser's rendering engine.
I think I would explore 2 avenues: first could I... |
All the answers here seem right: locks' usefulness is to block threads from acessing locked code concurrently. However, there are many subtleties in this field, one of which is that locked blocks of code are automatically marked as **critical regions** by the Common Language Runtime.
The effect of code being marked ... |
IMHO you should notify the user, asking him to verify the email, without retries. If user does not verify the email and leave the page, you better rule back the account since the user can not access it anyway. Most cases of timeout would be for invalid email accounts. Users either made a mistake or gave you a non exist... |
IMHO you should notify the user, asking him to verify the email, without retries.
If the user does not verify the email and leaves the page, you better roll back the account since the user can not access it anyway.
Most cases of timeout would be caused by invalid email accounts. Users either made a mistake or g... |
It's a easy mechanism to determine which tags are most popular or how dense that tag is populated ( amount of tags).
It's just a intuative interface, I'm fairly certain that's one of the bigger reason's why they are so popular, that and they are very Web 2.0 also. |
Because searching for php is not the same as viewing all posts that the owner has tagged as php. Try it. |
It's more of a browse assist than a search assist. If you see a large or bold tag in a tag cloud that interests you it my lead to some knowledge discovery that wouldn't have otherwise been sought out with a deliberate search. When I am browsing del.ico.us or stackoverflow I appreciate the tags as they sometimes lead ... |
[This link](http://feedvalidator.org/) will allow you to validate the link against the RSS/Atom specifications.
If the link itself isn't a feed, you can parse it and look for a specified feed in the <head> section of the page, e.g:
<link rel="alternate" title="RSS Feed"
href="http://www.exampl... |
[This link](http://feedvalidator.org/) will allow you to validate the link against the RSS/Atom specifications.
There are a number of ways to do this programmatically, depending on your choice of language - parsing the file [as valid XML](http://www.contentwithstyle.co.uk/Blog/132/) is a good way to start, then comp... |
[This link](http://feedvalidator.org/) will allow you to validate the link against the RSS/Atom specifications using the W3C specs, but does require you to manually enter the url.
There are a number of ways to do this programmatically, depending on your choice of language - in PHP, parsing the file [as valid XML](ht... |
You can define a small helper function to provide the benefits of `with` without the ambiguity:
var with_ = function (obj, func) { func (obj); };
with_ (object_name_here, function (_)
{
_.a = "foo";
_.b = "bar";
});
|
To access cached items, new cache session must be created using *createSession* method provided in *[nsICacheService][1]*. This method creates *[nsICacheSession][2]*
object. Information about cache item can be obtained using *openCacheEntry* method of the session object (method return *[nsICacheEntryDescriptor][3]*). ... |
How do I dissasemble a VC++ application? |
|c++| |
I work with graph structures in Java a lot, and my advice would be to make any data member of the Node and Edge class that the Graph depends on for maintaining its structure final, with no setters. In fact, if you can, I would make Node and Edge completely immutable, which has <a href="http://www.javapractices.com/topi... |
Why is my cocoa program getting EXC_BAD_ACCESS during startup? |
|macos|xcode|cocoa|exc-bad-access| |
During the load of my cocoa application, my program crashes with the messsage EXC_BAD_ACCESS. The stack trace is not helpful. Any clues to how I can find the problem? |
|macos|cocoa|xcode|exc-bad-access| |
For a XML document to be queryable using XQquery you do not have to define a DTD or XSD. The purpose of DTD or XSD is to define the strict structure of a XML document and to allow validation before usage.
Modern browsers interpret XML files very nicely and show a DOM tree. If enhanced formatting of XML for browser d... |
I am sure a responsive UI is something that everyone strives for and the reccomended way to do stuff is to use the BackgroundWorker for this.
Do you find it easy to work with ? Do you use it often ? Or do you have your own frameworks for lengthy tasks and reporting process.
I have found that I am using it quite ... |
How often do you use System.Component.BackgroundWorker in your UIs ? (if ever) |
|.net|winforms|user-interface|multithreading| |
If you are interested how all this generally works client-site, this is it:
All the solutions hook up the form via javascript and change the forms target to a newly created, invisible IFRAME. Then they are free to use AJAX to request some status about the file from the server.
The IFRAME trick is needed because a... |
As others have pointed out, "" implies one terminating '\0' character, so "\0" actually initializes the array with two null characters.
Some other answerers have implied that this is "the same", but that isn't quite right. There may be no practical difference -- as long the only way the array is used is to referenc... |
How to create a non-interactive window in MFC |
|mfc|focus|activation| |
In my application I have a window which I popup with small messages on it (think similar to tooltip). This window uses the layered attributes to draw alpha backgrounds etc.
If I have several of these windows open at once, and I click one with my mouse, when they disappear they cause my application to lose focus (it ... |
[VisualSVN Server][2] is a complete installer for Subversion Server on Windows.
[VisualSVN][1] is a Visual Studio plugin for Subversion integration.
[1]: http://www.visualsvn.com/visualsvn/
[2]: http://www.visualsvn.com/server/ |
I use it quite often for tasks such as progress indication and background data loading\processing.
Recently i found use case that is not supported out of box. It's "Overridable Task". However Patric Smacchia come up with nice [solution][1].
[1]: http://codebetter.com/blogs/patricksmacchia/archive/2008/06/10/b... |
BackgroundWorker makes things a lot easier. One thing I found the hard way is Backgroundworker itself has thread affinity even though it is supposed to hide the thread switching problem. It does not automatically switch to the UI thread in every case. It needs to be created and run from the UI thread for thread switchi... |
Many of the articles have the string "TPJ" at the end of the article, so I get <a href="http://www.ddj.com/TechSearch/searchResults.jhtml?queryText=TPJ&x=0&y=0">quite a few results from searching just "TPJ"</a>. I'll put together an index of what I can find since I've been meaning to do this for a long time. Are you lo... |
Many of the articles have the string "TPJ" at the end of the article, so I get <a href="http://www.ddj.com/TechSearch/searchResults.jhtml?queryText=TPJ&x=0&y=0">quite a few results from searching just "TPJ"</a>. I'll put together <a href="http://www.perlmonks.org/index.pl?node_id=711609">an index of the articles they p... |
I've been stuck building on ASP, and I feel your pain.
1) The best way to query against SQL Server is with parameterized queries; this will help prevent against SQL injection attacks.
Tutorial (not my blog):<br>
<a href="http://www.nomadpete.com/2007/03/23/classic-asp-which-is-still-alive-and-parametised-queries... |
ISP states that:
> Clients should not be forced to depend
> on methods that they do not use.
ISP principle relates to important objects characteristic - [cohesion][1].
Ideally your components must be highly tailored. It improves code robustness and maintainability.
[1]: http://en.wikipedia.org/wiki/Co... |
ISP states that:
> Clients should not be forced to depend
> on methods that they do not use.
ISP principle relates to important objects characteristic - [cohesion][1].
Ideally your components must be highly tailored. It improves code robustness and maintainability.
Enforcing ISP gives you following bonuse... |
ISP states that:
> Clients should not be forced to depend
> on methods that they do not use.
ISP relates to important characteristics - [cohesion][1] and [coupling][2].
Ideally your components must be highly tailored. It improves code robustness and maintainability.
Enforcing ISP gives you following bonus... |
ISP states that:
> Clients should not be forced to depend
> on methods that they do not use.
ISP relates to important characteristics - [cohesion][1] and [coupling][2].
Ideally your components must be highly tailored. It improves code robustness and maintainability.
Enforcing ISP gives you following bonus... |
I believe the application has some parts that target .NET, and some that don't. I'm particularly interested in looking at the resource files, if there are any. |
|c++|resources|reverse-engineering| |
How do I disassemble a VC++ application? |
Code to make a DHTMLEd control replace straight quotes with curly quotes |
|html|vb6|dom| |
I've got an old, legacy VB6 application that uses the DHTML editing control as an HTML editor. The Microsoft DHTML editing control, a.k.a. DHTMLEd, is probably nothing more than an IE control using IE's own native editing capability internally.
I'd like to modify the app to implement smart quotes like Word. Specific... |
The only other reason I can think of then is that the web page is intentionally blocking it from loggin in. If you have access to the code, take a look at the loggin system used to see if theres anything designed to block such logins. |
Are you doing stand-up meetings and do you have burn down chart? I think those two areas would benefit you greatly. |
Using with also makes your code slower in many implementation, as everything now gets wrapped in an extra scope for lookup. There's no legitimate reason for using with in JavaScript. |
You might want to abstract the network layer, and then you can have unit tests that inject interesting failure events at appropriate points. |
Is it pythonic for a function to return multiple values? |
|python| |
In python, you can have a function return multiple values. Here's a contrived example:
def divide(x, y):
quotient = x/y
remainder = x % y
return quotient, remainder
(q, r) = divide(22, 7)
This seems very useful, but it looks like it can also be abused ("Well..function X al... |
php enabled webspace is usually less expensive than something with (asp).net.
You <i>might</i> call that a feature ;-) |
I think those kinds of boundary conditions most definitely belong in the API. However, I would (and often do) go a step further and indicate WHAT those null values mean. Either I indicate it will throw an exception, or I explain what the expected results are when the boundary value is passed in.
It's hard to remem... |
How do I change the background color in gnuplot? |
|gnuplot| |
I have a script that renders graphs in gnuplot. The graphs all end up with an ugly white background. How do I change this? (Ideally, with a command that goes into a gnuplot script, as opposed to a command-line option or something in a settings file) |
If you've never written a parser before, start with something simple. Parsers are surprisingly subtle, and you can get into all sorts of trouble writing them if you've never studied the structure of programming languages.
Reading Aho, Sethi, and Ullman (it's known as "The Dragon Book") is a good plan. Contrary to ot... |
You'd have to use JavaScript or your server to do user-agent sniffing in order to send CSS specifically to Safari/WebKit. |
For firefox you can apply the CSS declaration "-moz-user-select" to "none"
Check out their docs: http://developer.mozilla.org/En/CSS/-moz-user-select
It's a "preview" of the future "user-select" as they say, so maybe opera or webkit-based browsers will support that. I also recall finding something for IE, but don't... |
Careful! If you use an answer (like the one by Brian Bondy currently voted up) where you move items back from the second stack to the first, the solution does not have amortized constant time, and can be made faster. For example, if the queue contains 100 elements, and then repeatedly a new item is pushed then popped,... |
Careful! If you use an answer (like the one by Brian Bondy currently voted up) where you move items back from the second stack to the first, the solution does not have amortized constant time, and can be made faster. For example, if the queue contains 100 elements, and then repeatedly a new item is pushed then popped,... |
|c++|winapi|encryption|windowssdk| |
|c++|encryption|winapi| |
What Certificate Authority Software is Available? |
|linux|certificateauthority|openssl| |
I am running a number of SSL-encrypted websites, and need to generate certificates to run on these. They are all internal applications, so I don't need to purchase a certificate, I can create my own.
I have found it quite tedious to do everything using openssl all the time, and figure this is the kind of thing that ... |
|linux|openssl|certificate-authority| |
RFC calculation in Java need help with algorithm |
|java|regex|algorithm|reflection|regularexpression| |
The RFC for a Java class is set of all methods that can be invoked in response to a message to an object of the class or by some method in the class.
RFC = M + R where
M = Number of methods in the class.
R = Total number of other methods directly invoked from the M.
Thinking C is the .class and J is the .java f... |
|java|algorithm|regex|reflection| |
I have never used it. I completely agree, it's bloatware. I usually end up using the repeater with custom controls that i made. |
C# Save Dialogs |
|c#|stringparsing| |
What would be the easiest way to separate the directory name from the file name when dealing with SaveFileDialog.FileName in C#?
|
|c#|string|parsing| |
How to redirect siteA to siteB with A or CNAME records |
Imagemagick is good, and has two APIs for PHP:
http://www.imagemagick.org/script/api.php#php
http://www.imagemagick.org/script/api.php#php |
SELECT * FROM INFORMATION_SCHEMA.TABLES
That should be a good start. For more, check [INFORMATION_SCHEMA Tables][1].
[1]: http://dev.mysql.com/doc/refman/5.0/en/information-schema.html |
I don't understand why you want to use SELECT * FROM as part of the statement.
[12.5.5.30. SHOW TABLES Syntax][1]
[1]: http://dev.mysql.com/doc/refman/5.0/en/show-tables.html |
typedef unsigned long TYPE;
TYPE reverser(TYPE n)
{
TYPE k = 1, nrev = 0, i, nrevbit1, nrevbit2;
int count;
for(i = 0; !i || (1 << i && (1 << i) != 1); i+=2)
{
/*In each iteration, we swap one bit
on the 'right half' of the number with another... |
Where can i find the XML schema (XSD-file) for the Glade markup language? |
|xml|xsd|markup|glade| |
As stated in the title, i'm looking for an XML schema (XSD-file) for the Glade markup language?
Wikipedia states that **Glade** is a schema based markup language ([list of schemas at wikipedia][1]). I tried to search the web, wikipedia and the glade website,but i couldn't find an XSD for Glade.
Thx,
Juve
... |
Sitepoint has a very [comprehensive guide to CSS](http://reference.sitepoint.com/css) |
Anyone using Lisp for a MySQL-backended web app? |
|database|mysql|lisp| |
I keep hearing that Lisp is a really productive language, and I'm enjoying [SICP][1]. Still, I'm missing something useful that would let me replace PHP for server-side database interaction in web applications.
Is there something like PHP's [PDO][2] library for Lisp or Arc or Scheme or one of the dialects?
[1... |
Obfuscation *shouldn't* change the runtime performance of your code. If it is then you've got a bad obfuscator that's doing much more than just obfuscating. All obfuscation should do is make your IL hard to read. |
In addition to the comments by @jhkiley.blogspot.com, you can create a factory for Edges and Nodes that refuses to create objects with a name that was already used. |
.net: System.Web.Mail vs System.Net.Mail |