instruction
stringlengths
0
30k
Weborb ([http://www.themidnightcoders.com/weborb/][2]) has some awesome benefits on the data access side if you're looking to do some AMF as well as streaming video it could be a very decent option (and has a php and .net version). On the python side I found ([http://rtmpy.org/][3]) but couldn't say too much about...
Problems with disabling IIS shutdown of idle worker process?
|iis|
I ran into an issue with an IIS web app shutting down an idle worker process. The next request would then have to re-initialize the application, leading to delays. I disabled the IIS shutdown of idle worker processes on the application pool to resolve this. Are there any issues associated with turning this off? If ...
> This also has issues, because I have to explicitly null the session value during non postbacks in order to emulate how ViewState works. Why do you **have** to explicitly null out the value (aside from memory management, etc)? Is it not an option to check Page.IsPostback, and either do something with the Session v...
For simple sites, I actually prefer ASP vs. ASP.NET, especially if you know HTML well. However with ASP, separating business logic from view is hard; the code you write will likely be challenging to read + maintain. PHP is better than ASP though - and somewhat similar at the basic level. And you could always go to R...
One advantage to ASP.NET is that you have the option of coding your site exactly as you did with classic ASP, along with access to the richness of the .NET framework. You can keep existing functionality and add new ASP.NET functionality were needed. They mix well. Unfortunately the author of the referenced [article]...
There are two approaches in the standard library. One is to use java.text.DecimalFormat. The other more cryptic methods (String.format, PrintStream.printf, etc) based around java.util.Formatter should keep C programmers happy(ish).
I was also thinking on lines of [XML Diff][1] since basically HTML is a subset of XML. The challenge with HTML is that it might not be always well formed. Found one more here showing how to use [XMLDiff class][2]. [1]: http://msdn.microsoft.com/en-us/library/aa302294.aspx [2]: http://msdn.microsoft.com/en-u...
I was thinking on lines of [XML Diff][1] since HTML can be represented as an XML Document. The challenge with HTML is that it might not be always well formed. Found one more here showing how to use [XMLDiff class][2]. [1]: http://msdn.microsoft.com/en-us/library/aa302294.aspx [2]: http://msdn.microsoft.com/...
Did you try [GOA WinForms][1]? [1]: http://www.netikatech.com/products/default.aspx
Your declaration: `DIM arr(3,3) As Integer` allready specifies that there are 3 elements in any given row (or 4, I'm not so sure about VB) You could try: Dim arr(3) as Integer() You should then be able to do: arr(n).Length To find the length of row n. I'm a bit rusty on VB6 and never learned V...
In bioinformatics when you align two sequences you can have a model that will have a different cost based on if it's a transition or a transversion. This is exactly what you want but instead of a 4x4 matrix, you want a 40x40 --or however many keys you want to include. So the cost of a replacement is from the matrix,...
In bioinformatics when you align two sequences you can have a model that will have a different cost based on if it's a transition or a transversion. This is exactly what you want but instead of a 4x4 matrix, you want a 40x40 --or however many keys you want to include. So the cost of a replacement is from the matrix/...
mweerden: NT has been designed for multi-user from day one, so this is not really a reason. However, you are right about that process creation plays a less important role on NT than on Unix as NT, in contrast to Unix, favors multithreading over multiprocessing. Rob, it is true that fork is relatively cheap when COW ...
I can wholeheartedly recommend writing such a process with a simple Perl client using the Mail::IMAPClient module. #!/usr/bin/perl -w use strict; use Mail::IMAPClient; # returns an unconnected Mail::IMAPClient object: my $imap = Mail::IMAPClient->new( Server => $h...
You may want to take a look to [cpp-sockets][1], a C++ wrapper for the sockets system calls. It works with many operating systems (Win32, POSIX, Linux, *BSD). I don't think it will work with z/OS but you can take a look at the include files it uses and you'll have many examples of tested code that works well on other O...
You can easily simulate user input. You can submit form on the web page from you program by sending post\get request to a website. It's not clear what language\framework you're going to use. For example there is a whole framework for screen scraping (including login functionality) written in perl - [WWW::Mechanize][1] ...
You can easily simulate user input. You can submit form on the web page from you program by sending post\get request to a website. Typical login form looks like: <form name="loginForm" method="post" Action="target_page.html"> <input type="Text" name="Username"> <input type="Password" name="Pas...
One thing you might want to look at are [Soundex][1] searches, which are quite useful for misspellings and contractions. This however is not an in-database validation so it may or may not be what you're looking for. [1]: http://en.wikipedia.org/wiki/Soundex
Both of John's solutions would work. Another option that allows HTMLDecorator to remain very simple and clean is to monkey-patch it in as a base class. This also works only for user-defined classes, not builtin types: import cgi class ClassX(object): pass # ... with own __repr__ class Cl...
Both of John's solutions would work. Another option that allows HTMLDecorator to remain very simple and clean is to monkey-patch it in as a base class. This also works only for user-defined classes, not builtin types: import cgi class ClassX(object): pass # ... with own __repr__ class Cl...
I think it's not possible with Team Explorer. But you can with [CodePlex Source Control Client][1] or [Tortoise][2] [1]: http://www.codeplex.com/CodePlexClient [2]: http://www.codeplex.com/CodePlex/Wiki/View.aspx?title=Using%20TortoiseSVN%20with%20CodePlex&referringTitle=Source%20control%20clients
I think you have to use the [CodePlex Source Control Client][1]. In includes cpc.exe which supports the anonymous access features of CodePlex TFS servers for non-coordinator/developer access. But according to the site: > The CodePlex Client is not currently > being maintained. The focus of the > CodePlex team now ...
You could try integrating Sphinx with [Asterisk][1]: [http://www.syednetworks.com/asterisk-integration-with-sphinx-voice-recognition-system][2] [1]: http://www.asterisk.org/ [2]: http://www.syednetworks.com/asterisk-integration-with-sphinx-voice-recognition-system
I used VisualSVN until Ankh hit 2.0, and ever since, I've abandoned VisualSVN. Ankh has surpassed VisualSVN in functionality, in my mind, and all the 1.x perf and integration issues are gone.
There's also [Zinc][1] that also provides API:s for accessing the filesystem and other thinks that AIR does, but less restrictive. [1]: http://www.multidmedia.com/software/zinc/
I have used ASP.NET MVC for a few projects recently and its like a breath of fresh air compared to WebForms. It works *with* the web rather than against it, and feels like a much more natural way to develop. I use SubSonic rather than NHibernate, and find it fits very nice within the MVC architecture. The buildin...
@[Kevin](#23889): > I was just trying to point out that spl_autoload_register is a better alternative to __autoload since you can define multiple loaders, and they won't conflict with each other. Handy if you have to include libraries that define an __autoload function as well. Are you sure? The [documentation](h...
If you want to code in Java I really recommend SerialIOs [SerialPort][1]. It is very ease to use and saves you days of work. My advice: do not use Sun's serial IO framework! It is from 1998 and full of bugs. You can use [rxtx][2] but serialio is better! [1]: http://serialio.com/products/serialport/serialport....
Block the finalizer.
You can also use X-Http-Verb-Override:DELETE inst. of HTTP DELETE. This is also usefull for Silverlight clients who cant change the HTTP verbs and only support GET and POST...
If JConsole can't be used you can - press CTRL+BREAK under Windows - send `kill -3 <process id>` under Linux to get a full Thread Dump. This doesn't affect performance and can always be run in production.
davidg was on the right track, and I am crediting him with the answer. But the WMI query necessary was a little less than straightfoward, since I needed not just a list of users for the whole machine, but the subset of users *and groups*, whether local or domain, that were members of the local Administrators group. ...
In bioinformatics when you align two sequences you can have a model that will have a different cost based on if it's a transition or a transversion. This is exactly what you want but instead of a 4x4 matrix, you want a 40x40 matrix or some, need i say distance function? So the cost of a replacement is from the matrix/f...
In bioinformatics when you align two sequences of DNA you might have a model that has a different cost based on if the substitution is a transition or a transversion. This is exactly what you want but instead of a 4x4 matrix, you want a 40x40 matrix or some, dare I say distance function? So the cost of a replacement is...
Windows XP support for Remote NDIS
|windows|embedded|usb|drivers|ndis|
I'm looking at developing a device which will need to support Ethernet over USB (hosted in Linux, XP, and Vista). As I understand it, Vista and Linux support the industry standard USB CDC. However, in classic Windows style, XP only supports it's own Remote NDIS. So, now I'm thinking of just bowing down and doing it o...
sys.argv[0] usually contains this information. Check the [sys documentation][1] for more details. [1]: http://docs.python.org/lib/module-sys.html
It's not entirely clear what you mean by "the filepath of the file that is currently running within the process". `sys.argv[0]` usually contains the location of the script that was invoked by the Python interpreter. Check the [sys documentation][1] for more details. As @[Tim](#50521) and @[Pat Notz](#50505) have p...
You can easily simulate user input. You can submit form on the web page from you program by sending post\get request to a website. Typical login form looks like: <form name="loginForm" method="post" Action="target_page.html"> <input type="Text" name="Username"> <input type="Password" name="Pas...
Free JSP plugin for eclipse?
|eclipse|jsp|
I was looking out for a free plugin for developing/debugging JSP pages in eclipse. Any suggestions?
Read this article on Chrome and Open Source on Linux: <http://arstechnica.com/journals/linux.ars/2008/09/02/google-unveils-chrome-source-code-and-linux-port> The Google V8 JavaScript Engine is also open source and available here if you want to contribute; <http://code.google.com/p/v8/> If you want to contri...
Read this article on Chrome and Open Source on Linux: <http://arstechnica.com/journals/linux.ars/2008/09/02/google-unveils-chrome-source-code-and-linux-port> The Google V8 JavaScript Engine is also open source and available here if you want to contribute; <http://code.google.com/p/v8/> If you want to contri...
You could try integrating Sphinx with [Asterisk][1]: - [http://www.syednetworks.com/asterisk-integration-with-sphinx-voice-recognition-system][2] - [http://www.voip-info.org/wiki/view/Sphinx][3] [1]: http://www.asterisk.org/ [2]: http://www.syednetworks.com/asterisk-integration-with-sphinx-voice-recog...
Reflection is a set of functions which allows you to access the runtime information of your program and modify it behavior (with some limitations). It's useful because it allows you to change the runtime behaivour depending on the meta information of your program, that is, you can check the return type of a function...
Not every language supports reflection but the principles are usually the same in languages that support it. Reflection is the ability to "reflect" on the structure of your program. Or more concrete. To look at the objects and classes you have and programmatically get back information on the methods, fields, and int...
Most programmers don't like to stray out of their comfort zones (note that the intersection of the 'most programmers' set and the 'Stack Overflow' set is the probably the empty set). "If it worked before (or even just worked) then keep on doing it". The project I'm currently on required a lot of argument to get the old...
The name reflection is used to describe code which is able to inspect other code in the same system (or itself). For example, say you have an object of an unknown type in Java, and you would like to call a 'doSomething' method on it if one exists. Java's static typing system isn't really designed to support this unl...
Backup and Restore is the most straight-forward way I know. You have to be careful between servers as security credentials don't come with the restored database.
Sounds like you might like [Git][1]. There's a Google Talk [explaining all about it][2]. [1]: http://git.or.cz/ [2]: http://www.youtube.com/watch?v=4XpnKHJAok8
If you are consuming your Web service from a .NET page/application, you should be able to access the enumeration after you add your Web reference to the project that is consuming the service.
From the [preg_replace documentation][1] on php.net: > *replacement* may contain references of > the form \\n or (since PHP 4.0.4) $n, > with the latter form being the > preferred one. Every such reference > will be replaced by the text captured > by the n'th parenthesized pattern. See Flubba's example. ...
Its probably not exactly what your looking for, but you may be able to implement OS level clustering.
I like [TestDriven.NET][1] (even though I use ReSharper) and I'm pretty happy with [XUnit.net][2]. It uses Facts instead of Tests which many people dislike but I like the difference in terminology. It's useful to think of a collection of automatically provable Facts about your software and see which ones you violate wh...
*@Dillie-O: Your answer put me in the right direction (I should have expected it to just be a registry change) and I got this working. But I'm going to mark this as the answer because I'm going to put some additional information that I found while working on this.* The solution to this question really doesn't matter...
*@Dillie-O: Your answer put me in the right direction (I should have expected it to just be a registry change) and I got this working. But I'm going to mark this as the answer because I'm going to put some additional information that I found while working on this.* ***Edit:** So I can't mark this as the answer, prob...
Context Menu Resets ComboBox's SelectedIndex
|contextmenu|combobox|selectedindex|
I have a ContextMenu that is displayed after a user right clicks on a ComboBox. When the user selects an item in the context menu, a form is brought up using the ShowDialog() method. If frmOptions.ShowDialog() = Windows.Forms.DialogResult.Cancel Then LoadComboBoxes() End If When th...
|.net|winforms|combobox|contextmenu|selectedindex|
Dim arr(3, 3) As Integer Dim y As Integer Dim x As Integer For x = 0 To arr.Rank - 1 For y = 0 To arr.GetLength(x) - 2 arr(x, y) = x + y Next Next The above code worked for me. Edit, the code feels dirty though. I'm wondering what it is you are trying...
multiple top level windows are easy to implement and have all the advantages of MDI - that's what MS selected for the newer versions of Office
There have been cases where the tools (capital) a company has purchased is worth more than the company, and the company is purchased and gutted just to obtain those tools at a discount. This is bad for the company, of course, but the tool vender especially doesn't want this to happen - they lose a potential full-pri...
There have been cases where the tools (capital) a company has purchased is worth more than the company, and the company is purchased and gutted just to obtain those tools at a discount. This is bad for the company, of course, but the tool vender especially doesn't want this to happen - they lose a potential full-pri...
Compile a PHP script in Linux
|php|linux|
I know php scripts don't actually compile until they are run. However say I want to create a small simple program and compile it to a binary without requiring the php binary. How could I do this? I'v seen a few IDE's out there that would do this, but either they are all for windows or the linux versions don't actual...
Many of the above, plus TED talks and Shareware Radio. Links here: <http://successfulsoftware.net/category/podcasts/>
I second Tom's answer that you should pick the one that is easier to understand and maintain. The query plan of any query in any database cannot be predicted because you haven't given us indexes or data distributions. The only way to predict which is faster is to run them against *your* database. As a rule of thu...
Having a normalized database will give you the most flexibility and the easiest maintenance. I always start with a normalized database and then un-normalize only when there is an real life problem that needs addressing. I view this similarly to code performance i.e. write maintainable, flexible code and make comprom...
SharePoint Infrastructure Upgrade - whoops
|sharepoint|
I applied the MOSS infrastructure upgrade w/o applying the WSS one before it -- uh, help!
I am very heavy into Java development and I personally use Ubuntu, so I agree with Sean on this one. The package manager allows you to easily install the various SDKs (the SUN one, or even the upcoming OpenJDK 7). Regards, Arjen
You can try [Webrenderer][1] or [Ice Browser][2] [1]: http://www.webrenderer.com/products/swing/product/ [2]: http://www.icesoft.com/products/icebrowser.html
FiveRuns have a gem named [DataFabric][1] that does application-level sharding and master/slave replication. It might be worth checking out. [1]: http://blog.fiveruns.com/2008/7/9/introducing-data_fabric
Django has a built in template helper for this exact scenario: http://www.djangoproject.com/documentation/templates/#unordered-list
There is this: http://www.bambalam.se/bamcompile/ but that compiles to Windows bytecode. There are a few others, but all I have seen will compile for windows only.<br /><br />Few More: <br />http://www.nusphere.com/products/phpdock.htm
There is this: http://www.bambalam.se/bamcompile/ but that compiles to Windows bytecode. There are a few others, but all I have seen will compile for windows only.<br /><br />Few More: <br />http://www.nusphere.com/products/phpdock.htm Edit: I almost forgot if your looking to make it work on linux without regard f...
The name reflection is used to describe code which is able to inspect other code in the same system (or itself). For example, say you have an object of an unknown type in Java, and you would like to call a 'doSomething' method on it if one exists. Java's static typing system isn't really designed to support this unl...
Displaying XML data in a Winfoms control
|xml|winforms|formatting|c#|
I would like to display details of an xml error log to a user in a winforms application and am looking for the best control to do the job. The error data contains all of the sever variables at the time that the error occurred. These have been formatted into an XML document that looks something to the effect of: ...
|c#|xml|winforms|formatting|
I would like to display details of an xml error log to a user in a winforms application and am looking for the best control to do the job. The error data contains all of the sever variables at the time that the error occurred. These have been formatted into an XML document that looks something to the effect of: ...
Try to write code to be more flexible. For example, if you have a method that accepts an array as a parameter, would you be able to accept an IEnumerable or IList instead?
We use 50.
The site GetSatisfaction has been an increasingly popular way to get customer feedback. http://getsatisfaction.com/for_companies GetSatisfaction is a community based site that builds a community around your application. Users can post questions, comments, and feedback about and application and get answers to the...
If it's full name in one field, I usually go with 128 - 64/64 for first and last in separate fields - you just never know.
I usually go with varchar(255) (255 being the maximum length of a varchar type in MySQL).
@Jonathan Holland I saw that you were voted down, but that is a VERY VALID point. I have been reading some posts around the intertubes where people seem to be confusing ASP.NET MVC *[the framework][1]* and MVC *[the pattern][2]*. MVC in of itself is a **DESIGN PATTERN**. If all you are looking for is a "separation o...
The dialog you're looking for is this one in the project properties: ![Platform target][1] (linked from [this blog][2]) by default, the target will be "Any CPU" which means it'll run as 64bit on a 64bit OS (like you're using), or 32bit on a 32bit OS - so this wont stop it from working on 32bit systems. But lik...
The dialog you're looking for is this one in the project properties: ![Platform target][1] by default, the target will be "Any CPU" which means it'll run as 64bit on a 64bit OS (like you're using), or 32bit on a 32bit OS - so this wont stop it from working on 32bit systems. But like you said, to use Edit & Contin...
The average first name is about 6 letters. That leaves 43 for a last name. :) Seems like you could probably shorten it if you like. The main question is how many rows do you think you will have? I don't think varchar(50) is going to kill you until you get several million rows.
Django Sessions
|django|python|