instruction
stringlengths
0
30k
|testing|
Is there a tool to automatically search through my site and test all the links? I hate running across bad urls.
Contains is not supported in EF at this time.
From Books Online: A table variable behaves like a local variable. It has a well-defined scope, which is the function, stored procedure, or batch in which it is declared. Given this, there should be no need to look up this value at run-time because you have to know it at design-time.
A stack overflow does not necessarily yield a crash. It may silently trash data of your program but continue to execute. I wouldn't use SIGSEGV handler kludges but instead fix the original problem. If you want automated help, you can use gcc's -Wstack-protector option, which will spot some overflows at runtime an...
[This link][1] has a video describing how pointers work, with claymation. Informative, and easy to digest. [This page][2] has some good information on the basic of classes. [1]: http://cslibrary.stanford.edu/104/ [2]: http://parashift.com/c++-faq-lite/classes-and-objects.html
I am sure if this will work or not as I have not tried this out in my projects. (Looking at your JS, I believe you are using jQuery. If not, please correct me) Once you have populated the divPDF with the object you might try the code below: $("objPDF").attr({ data: "dir/to/newPDF" }); Agai...
Rich Strahl just posted a blog entry on Running VisualSVN Server for Subversion Source Control. Worth a read: <http://west-wind.com/weblog/posts/480534.aspx>
Use tables when you need to ensure that elements need to remain in a specific physical relationship in the layout. For data, the table is generally the best layout element to use because you do not want your columns to wrap in an uxexpected ways and confuse the associations. One could also argue that non-data eleme...
Does your form have a checkbox, toggle button or option button? There's a bug in Access 2000 where Access won't close if you test the value without explicitly using the Value property in the vba code, like this: If Me.chkbox Then versus: If Me.chkbox.Value Then
You can always add exception handling to your program to catch these kinds of faults and ignore them (though the details are platform specific) ... but that is very much a two edged sword. Instead consider having the program catch the exceptions and create dump files for analysis. If your program has behaved in an u...
Couldn't you just subscribe to the Click event? Something like this: ToolStripButton btn = new ToolStripButton("The text on the item."); this.tsmiDelete.DropDownItems.Add(btn); btn.Click += new EventHandler(OnBtnClicked); And OnBtnClicked would be declared like this: private void OnBtnClicked...
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. Have a testing database, and baseline reports showing what the output of the monthly processin...
What is the best way to share files between Xen VM's?
|xen|file-sharing|
Is there some built-in way to share files between Xen VMs with Xen? I don't currently need to share the actual images, just some data files.
Is there some built-in way to share files between Xen guests? I don't currently need to share the actual images, just some data files.
Almeza MultiSet (http://www.almeza.com/content/view/31/41/) or nLite (http://www.nliteos.com/guide/). In fact Almeza MultiSet is free **today** only at http://www.giveawayoftheday.com where nLite is always free.
Almeza MultiSet (http://www.almeza.com/content/view/31/41/) or nLite (http://www.nliteos.com/guide/).
if you are working in the java world - *intelliJ idea* has also extensive xml support, including xsd generation and samle xml from xsd generation, and with plugins you can get xslt debuggers. - especially nice if you plan to use tools such as jaxb afterwards.
Your question sort of has been answered in [this question][1]. To add to that, the embedded processor industry is very segmented, it doesn't have a major player like Intel/x86 is for the "desktop" processor industry. The ARM processor does have a large share, so does MIPS I believe, and there are many smaller more s...
[Arduino][1] seems to be the platform of choice these days for beginners although there are lots of others. I like the [Olimex][2] boards personally but they are not really for beginners. [Microchip][3]'s PIC range of CPUs are also excellent for beginners, especially if you want to program in assembler. BTW, Asse...
*but good horrors the syntax in those ocaml examples looks obscure* This is the basic syntactic trade-off with Lisp. If you want the power of lisp-like macros, you tend to either end up with lisp-like syntax for the language, or else your macro syntax is pretty weird....
*but good horrors the syntax in those ocaml examples looks obscure* There you're running into the same fundamental syntactic trade-off you do with Lisp. If you want the power of lisp-like macros, you tend to either end up with lisp-like syntax for the language, or else your macro syntax looks quite different from y...
Like jmah said, you can use suffix trees/suffix arrays for this. There is a description of an algorithm you could use [here][1] (see Section 3.1). You can find a more in-depth description in the book they cite (Gusfield, 1997), which is [on google books][2]. [1]: http://pine.cs.yale.edu/pinewiki/StringAlgo...
The best approach depends on what you want to do: - If you want to bundle your dependencies into a WAR or EAR file, then simply set the packaging type of your project to EAR or WAR. Maven will bundle the dependencies into the right location. - If you want to create a JAR file that includes your code along with ...
whiteboards are your best friends prototype designs (not necessarily working prototypes, use notecards or other methods) plan first! dont code until you know your requirements/goals
What is the best solution for database connection pooling in python?
|python|mysql|connection-pooling|
I have developed some custom DAO-like classes to meet some very specialized requirements for my project that is a server-side process that does not run inside any kind of framework. The solution works great except that every time a new request is made, I open a new connection via MySQLdb.connect. What is the ...
I have developed some custom DAO-like classes to meet some very specialized requirements for my project that is a server-side process that does not run inside any kind of framework. The solution works great except that every time a new request is made, I open a new connection via MySQLdb.connect. What is the ...
The "[Resource Acquisition Is Initialization][1]" paradigm is handy, particularly when writing in C++ and dealing with operating system resources (file handles, ports, etc.). A key benefit of this approach is that an object, once created, is "complete" - there is no need for two-phase initialization and no possibili...
Well, I can't say if this is the responsibility of the base class or not, and won't get into the perils of inheritance based contracts here. In any case, you *can* force some class to override a method - "Clone()" for example, by making it a *pure virtual* member of an abstract class public ref class Clonable...
In your example, if total\_disk_space is an INT you can use: UPDATE computers SET total_disk_space = total_disk_space + 120; I you're storing character data, then it will be far more interesting.
As a programmer who has been writing code under linux for many years, I simply cannot seem to move away from using Vim for writing code. Once you learn it, and learn some of its more advanced features (Code Folding, how to use ctags, how to work with multiple buffers effectively, etc) moving to another editor is ver...
As a programmer who has been writing code under linux for many years, I simply cannot seem to move away from using Vim for writing code. Once you learn it, and learn some of its more advanced features (Code Folding, how to use ctags, how to work with multiple buffers effectively, etc) moving to another editor is ver...
Thomas is correct but one way you would make that class abstract is to define a pure virtual method. This is done by saying: virtual void Clone() = 0; Unless the derived class implements Clone they won't be able to instantiate it so they'll have little choice if they want their class to be useful.
1. In the application we have something about 30 types of objects that are created repeatedly. 2. Some of them have long life (hours) some have short (miliseconds). 3. Objects could be created in one thread and destroyed in another. Does anybody have any clue what could be good pooling technique in the sense ...
1. In the application we have something about 30 types of objects that are created repeatedly. 2. Some of them have long life (hours) some have short (miliseconds). 3. Objects could be created in one thread and destroyed in another. Does anybody have any clue what could be good pooling technique in the sense ...
1. In the application we have something about 30 types of objects that are created repeatedly. 2. Some of them have long life (hours) some have short (miliseconds). 3. Objects could be created in one thread and destroyed in another. Does anybody have any clue what could be good pooling technique in the sense ...
The issue is that it's your shell that handles redirection; it's trying to open the file with *your* permissions not those of the process you're running under sudo. Use something like this, perhaps: sudo sh -c "echo 'something' >> /etc/privilegedFile"
RIghtFax Esoteric error message in .NET 1.1
|asp.net|vb.net|.net-1.1|rightfax|
I have a problem with rightfax component Interop.RFCOMAPILib.dll version 1.0.0.0 , using VB .NET 1.1. It works in severals enviroments , but it doesn´t in Production. It returns this message in the exception - "?" - . How i solve it? i couldn´t find any solution in manuals or internet . Thanks!
You can easily emulate serial communications (UARTs) using bit-banging from the IO pins of the system. Hook it to one of the card's pins and attach to a RS232 converter there (TTL to RS232 converters are easy to either buy or build), which goes to your PC's serial port.
I'm no AD/COM/IIS expert, but it could be a permissions problem. e.g the IUSR_computername user does not have applicable access within the directory, or you're not binding as a specific user? The alarm bell for me is the fact it runs ok from command line (e.g. running with your permissions) but fails on IIS (e.g. no...
One thing that you can do is have an automated script to store all changes to source control so that you can review changes to the procedures (using a diff on the previous and current versions)
Funnily enough I was going to suggest Remoting! The [Mono 1.0 Release Notes][1] (from archive.org because the original location is missing) mention System.Runtime.Remoting.dll as a supported library and doesn't say anything about known issues. If remoting is out then you probably have to implement your own TCP messa...
try using a css reset like the [eric meyer reset](http://meyerweb.com/eric/tools/css/reset/) or the [YUI reset](http://developer.yahoo.com/yui/reset/). will help but no easy or perfect way to make things look identical in every browser
Scott Meyers' *Effective C++* and *More Effective C++* are very good, and fun to read. Steve McConnell's *Code Complete* is a favorite of many, including Jeff Atwood. The Boost libraries are probably an excellent choice. One project where I work uses them. I've only used WIN32 threading myself.
I have found that even with the best planning divs come up short in several respects. For instance. there is no way with divs to have a bottom bar that always sits at the bottom of the browser, even when the rest of the content does not go to the bottom of the browser. Also, you cannot elegantly do anything better th...
I would recommend CodeBlocks. http://www.codeblocks.org/ Highlights: * Open Source! GPLv3, no hidden costs. * Cross-platform. Runs on Linux, Mac, Windows (uses wxWidgets). * Written in C++. No interpreted languages or proprietary libs needed. * Extensible through plugins Compiler: ...
I would recommend [CodeBlocks](http://www.codeblocks.org/). Highlights: - Open Source! GPLv3, no hidden costs. - Cross-platform. Runs on Linux, Mac, Windows (uses wxWidgets). - Written in C++. No interpreted languages or proprietary libs needed. - Extensible through plugins Compiler: - Multiple comp...
If you used the method you describe, and they worked, the focus would also change when the user clicks on the field, instead of tabbing to it. I can guarantee you that this would result in a frustrated user. (Why exactly it doesn't work is beyond me.) Instead, as said before, change the tabindex of the appropriate f...
Erm, it was exactly that problem of moving devPtr to global scope that was my problem. I have an implementation that does exactly that, with the two kernels having a pointer to data passed in. I explicitly don't want to pass in those pointers. I have read the documentation fairly closely, and hit up the nvidia fo...
Eclipse CDT will provide an experience comparable to using Visual Studio. I use Eclipse CDT on a daily basis for writing code and debugging local and remote processes. If your not familiar with using an Eclipse based IDE, the GUI will take a little getting used to. However, once you get to understand the GUI ide...
Eclipse CDT will provide an experience comparable to using Visual Studio. I use Eclipse CDT on a daily basis for writing code and debugging local and remote processes. If your not familiar with using an Eclipse based IDE, the GUI will take a little getting used to. However, once you get to understand the GUI ide...
The best way is to use Image tags which pull an image stream from your external sites. So if you're at www.some-site.com and you want to also be signed into www.some-partner-site.com you have this displayed after logging in: <img src="http://www.some-partner-site.com/sso.php?someQueryString=someValue" height="1" wi...
Drag-drop text selections to the Watch window while in the debugger.
firefox like searching: While having a source document open hit (CTRL + i) and type the word you are searching for you can hit (CTRL + I) again to see words matching your input.
It looks like the workaround description says you **should** try to set the UI before manipulating the filters. Does this not work? If that doesn't work, is it possible to create an instance of your manipulated FileFilters at the same point that you are setting your UI?
There's a really good article on CodeProject: [Image Recognition with Neural Networks](http://www.codeproject.com/KB/cs/BackPropagationNeuralNet.aspx).
How many times do you debug an array in a quickwatch or a watch window and only have visual studio show you the first element? Add ",N" to the end of the definition to make studio show you the next N items as well. IE "this->m_myArray" becomes "this->m_array,5".
Here is good example: [Brainnet 1 - A Neural Netwok Project - With Illustration And Code - Learn Neural Network Programming Step By Step And Develop a Simple Handwriting Detection System][1] that will demonstrate some practical uses of neural network programming. [1]: http://www.codeproject.com/KB/dotnet/neural...
How to pause / resume any external process under Windows ?
|windows|process|process-management|pause|
i am looking for different ways to pause and resume programmatically a particular process via his process ID under Windows XP. http://www.codeproject.com/KB/threads/pausep.aspx does it with SuspendThread / ResumeThread but warns about multithreaded programs and deadlocks problem. PsSuspend looks ok : http://techn...
I don't recall if [GeSHi][1] has a command-line program but even if it doesn't, it shouldn't be hard to whip one up. It does a great job of taking code and generating pretty, coloured HTML/XHTML, even with line numbers (or every X line numbers, even) and other helpful features. [1]: http://qbnz.com/highlighter/
Neural Netwok exaple in .net
|neural|network|.net|
I am not sure if this will work, as I have not tried this out in my projects. (Looking at your JS, I believe you are using jQuery. If not, please correct me) Once you have populated the divPDF with the object you might try the code below: $("objPDF").attr({ data: "dir/to/newPDF" }); Again,...
We use the `__FILE__` and `__LINE__` macros for diagnostic purposes in information rich exception throwing, catching and logging, together with automated log file scanners in our QA infrastructure. For instance, a throwing macro `OUR_OWN_THROW` might be used with exception type and constructor parameters for that ex...
[Xenu link sleuth][1] is excellent (and free) [1]: http://home.snafu.de/tilman/xenulink.html
Something like this should work: http://www.dead-links.com/ Do google searches for "404 checker" or "broken link checker"
Writing post data from one java servlet to another
|java|servlets|
I am trying to write a servlet that will send a XML file (xml formatted string) to another servlet via a POST. (Non essential xml generating code replaced with "Hello there") StringBuilder sb= new StringBuilder(); sb.append("Hello there"); URL url = new URL("theservlet's URL"); ...
I think this trick is a clever use of the preprocessor that can't be emulated with a function : #define COMMENT COMMENT_SLASH(/) #define COMMENT_SLASH(s) /##s #if defined _DEBUG #define DEBUG_ONLY #else #define DEBUG_ONLY COMMENT #endif Then you can use it like this: ...
What you are trying to do looks very similar to per-user home directories (see [http://httpd.apache.org/docs/2.0/howto/public_html.html][1]). The way Apache handles these is through file system permissions and .htaccess files (see [http://httpd.apache.org/docs/1.3/howto/htaccess.html][2]). I don't believe there is an...
ISerializable isn't used for xml serialization; its used for binary serialization. You would be better implementing IXmlSerializable. But I think that the KeyedCollection serializes more like you're thinking. Except you'll never get &lt;key0 ... /> &lt;key1 ... /> since the elements map to classes.
For my Computer Architecture course I had to work with both a PIC and an AVR; in my opinion the PIC was easier to work with, but that's maybe because that's what we worked with the most and we had the most time to get used to. We used the AVR maybe only a couple of times so I couldn't get the hang of it perfectly but i...
I'm not really in a position to tell you why kerberos isn't working for you, but did have a alternative suggestion for your configuration. You can use ISA services to expose the reporting server rather than simply poking a hole in your firewall. This is something our company has done successfully - it republishes the r...
How to concatenate icons into a single image with ImageMagick?
|graphics|bitmap|imagemagick|css-sprites|
I want to use [CSS sprites][1] on a web site instead of separate image files, for a large collection of small icons that are all the same size. How can I concatenate (tile) them into one big image using [ImageMagick][2]? [1]: http://alistapart.com/articles/sprites [2]: http://www.imagemagick.org/
Since the C++ cin reads from sys.stdin, you'll often do something more like the following. import sys tokens= sys.stdin.read().split() try: a= int(token[0]) b= float(token[1]) except ValueError, e: print e # handle the invalid input
The inode for / will always be 2 if it's the root directory of a filesystem, but you may be chrooted inside a complete filesystem. If it's just chroot (and not some other virtualization), you could run mount and compare the mounted filesystems against what you see. Verify that every mount point has inode 2.
Loading DLLs into a separate AppDomain.
|c#|.net|
I want to load one or more DLLs dynamically so that they run with a different security or basepath than my main application. How do I load these DLLs into a separate AppDomain and instantiate objects from them?
I once gave a talk on this topic. You can find my slides, code, and audio recording at [http://www.adventuresinsoftware.com/generics/][1]. [1]: http://www.adventuresinsoftware.com/generics/
<form name="mine"> <input type="text" name="one" onkeypress="if (mine.one.value == '123') mine.three.focus();" /> <input type="text" name="two"> <input type="text" name="three"> </form>
Best practice: How to handle concurrency of brower and website navigation.
|struts|navigation|browser|
Best practice: How to handle concurrency of browser and website navigation.
|browser|struts|navigation|
It is a well known problem to every web developer. As far as I tried to find a good solution to this problem - there was none (or at least I could not find it). ###_Lets assume the following:_ **_The user does not behave, as he was expected to._** The actual project I'm working in uses a navigation within the web...
It is a well known problem to every web developer. As far as I tried to find a good solution to this problem - there was none (or at least I could not find it). ###_Lets assume the following:_ **_The user does not behave, as he was expected to._** The actual project I'm working in uses a navigation within the web...
The [Yahoo css foundation][1] will help. To standardise formatting you will want reset and base. [1]: http://developer.yahoo.com/yui/base/
The [Yahoo User Interface][1] (YUI) has a [CSS Reset][2] implementation which seeks to form a common baseline across all browsers. This should get you pretty close. [1]: http://developer.yahoo.com/yui/ [2]: http://developer.yahoo.com/yui/reset/