instruction stringlengths 0 30k ⌀ |
|---|
Oracle has a migration workbench to port MS Access systems to Oracle Application Express, which would be worth investigating.
http://apex.oracle.com |
Mailman is one of the simplest mailing list packages I've come across, so if Mailman is more than you want to deal with I'd suggest just adding an entry into `/etc/aliases` for your mailing list.
Of course you have to manage it by hand, but you said it's only for a few friends so that may not be a problem. Just cre... |
Are you running this over Rails? If so, it's not RSpec's initialization that's slow, it's Rails'. Rails has to initialize the entire codebase *and yours* before running the specs. Well, it doesn't *have* to, but it does. RSpec runs pretty fast for me under my small non-rails projects. |
I have a large number of Enums that implement this interface:
/**
* Interface for an enumeration, each element of which can be uniquely identified by it's code
*/
public interface CodableEnum {
/**
* Get the element with a particular code
* @param code
* @return... |
You need to keep parsing the stream as headers until you see the blank line. The rest is the POST data.
You need to write a little parser for the post data. You can use C library routines to do something quick and dirty, like <tt>index</tt>, <tt>strtok</tt>, and <tt>sscanf</tt>. If you have room for it in your de... |
You could create a struct Date that provides access to the details you want/need, like:
public struct Date
{
public int Month; //or string instead of int
public int Day;
public int Year;
}
This is lightweight, flexible and gives you full control. |
No, but in my experience most things looking to speak WebDAV to something are pretty much expecting to work with files or documents of some sort. Since non-library lists in SharePoint don't really have an associated file (yeah, they can have attachments, but that's not the same), then effectively the primary construct... |
How to get reliable HTTP messages via Firefox XPCOM in Javascript |
|javascript|http|xpcom| |
I am trying to program a small server+client in Javascript on Firefox, using XPCOM.
To get the HTTP message in Javascript, I am using the nsIScriptableInputStream interface.
This f**ing component through the read() method randomly cut the message and I cannot make it reliable.
Is anybody know a solution to get r... |
C# is a nice language that fits your requirements, and it is definitely suited for graphics, thanks to the efforts of Microsoft to provide it with great tools and libraries like Visual Studio and XNA. |
The log file for database is full. |
|sql-server|sql-server-2000| |
So our SQL Server 2000 is giving me the error, "The log file for database is full. Back up the transaction log for the database to free up some log space."
How do I go about fixing this without deleting the log like some other sites have mentioned?
Additional Info: Enable AutoGrowth is enabled growing by 10% and... |
From an Embedded Systems Article by Dan Saks:
"A volatile object is one whose value might change spontaneously. That is, when you declare an object to be volatile, you're telling the compiler that the object might change state even though no statements in the program appear to change it."
Links to 2 great article... |
A Lambda expression can contain complex statements, so you can do the following:
Func<IEnumerator, object> f = ie => { ie.MoveNext(); return ie.Current; };
|
Beware index length limitations. If a table is structured, say:
a varchar(255)
b varchar(255)
key ('a', 'b')
You're going to go past the 1000 byte limit on key lengths. 255+255 is okay, but 255*3 + 255*3 isn't going to work. |
In my loop I was not re-initializing my StringBuilder ...thus the multiple insert statement I posted.
Thanks for your help anyway!! |
Depends on which language you're working in, but if you're active in Java then I'd recommend looking at [Apache CXF][1]. It's a pretty solid framework for publishing java code as a SOAP web service. It also includes a tool for directly generating WSDL files: [java2wsdl][2]
[1]: http://cxf.apache.org/
[2]: htt... |
If you want to use the .net Framework, Microsoft Silverlight is a good (the only?) choice. The browser does a good job as a shell, but you could also write your own application shell for it. For example, Scott Handelman [mentions][1] the NY Times Reader written in Silverlight and hostet on Cocoa on a Mac.
[1]: h... |
To avoid any potential confusion, I would like to contrast static variables and immutable objects.
Some primitive object types like integers, floats, strings, and touples are immutable in Python. This means that the object that is referred to by a given name cannot change if it is of one of the aforementioned object... |
Worse sin: side effects or passing massive objects? |
|function|side-effects|loops|global-variables|memory| |
I have a function inside a loop inside a function. The inner function acquires and stores a large vector of data in memory (as a global variable... I'm using "R" which is like "S-Plus"). The loop loops through a long list of data to be acquired. The outer function starts the process and passes in the list of datasets t... |
|memory|function|r|global-variables|side-effects| |
What is the best way to load a Hibernate object graph before using it in a UI? |
|java|hibernate| |
The situation is this:
- You have a Hibernate context with an
object graph that has some lazy
loading defined.
- You want to use
the Hibernate objects in your UI as
is without having to copy the data
somewhere.
- There are different UI
contexts that require different
am... |
Using Stack as Queue |
|c++|c|data-structures| |
Suppose we have two stacks and no other temporary variable . Is to possible to use it as a queue provided we have associated API i.e push,pop for stack and insert and remove for queue operations. |
|c++|c|data-structures| |
|data-structures| |
Look at what your compiler generates, particularly for hot areas of code. |
You have to install scaffold templates with:
grails install-templates
Now, edit in src/templates/scaffolding Controller.groovy and increase the value params.max as you want |
I think it would depend on the database type: transactional or data warehouse?
Anyhow, for all types I'd ask about specific to MySQL replication and clustering, performance tuning and monitorization concepts.
|
Just to add my thoughts to the stack
<xsl:template match="login_name[parent::current]">
<xsl:variable name="login" select="text()"/>
<xsl:value-of select='concat(ancestor::people/child::person[login_name=$login]/child::first/text()," ",ancestor::people/child::person[login_name=$login]/child::last/tex... |
Some syntax sugar
1 in [1,2,3] == true |
Do you have `requireSSL="true"` in your web.config?
I had similar symptoms to you. If you set requireSSL to true, there are some [additional considerations][1].
[1]: http://msdn.microsoft.com/en-us/library/ms998347.aspx#paght000022_additionalconsiderations |
E4X : Assigning to root node |
|javascript|apache-flex|air|e4x| |
I am using Adobe Flex/Air here, but as far as I know this applies to all of JavaScript. I have come across this problem a few times, and there must be an easy solution out there!
Suppose I have the following XML (using e4x):
var xml:XML = <root><example>foo</example></root>
I can change the contents of the... |
I thought I'd throw in a new perspective that can be taken with a grain of salt because I haven't tried it yet, but I plan on using [Bitten](http://bitten.edgewall.org/) for CI in an upcoming project. This runs atop Trac+SVN, both great tools that I've used for many projects successfully. |
CSLA has a useful helper class called SmartDate that addresses quite a lot of the problems when using dates in real applications. As far as I can recall it's coupled to the rest of the framework. |
I'd ask about the differences between the the various storage engines, their perceived benefits and drawbacks.
Defiantly cover replication, and dig into the drawbacks of replication, esp when using tables with auto increment keys.
If they are still with you then ask about replication lag, it's effects and standa... |
Brian gives a nice solution for converting it to a strongly typed collection.
Most of the CSV parsing methods given don't take into account escaping fields or some of the other subtleties of CSV files (like trimming fields). Here is the code I personally use. It's a bit rough around the edges and has pretty much no ... |
Not all languages share english capitalization rules. I guess you'd need to alter the data used by the API, but your non-english clients might not appreciate it...
[about.com on french capitalization][1]
[1]: http://french.about.com/library/writing/bl-capitalization.htm |
[Taglist][1], a source code browser plugin for Vim, is currently the top rated plugin at the [Vim website][2] and is my favorite plugin.
[1]: http://vim-taglist.sourceforge.net/
[2]: http://www.vim.org "Vim website" |
There is a nice [User Friendly Exception Handling][1] made by Jeff Atwood in 2004. I used it for several of our internal applications and it worked well.
[1]: http://www.codeproject.com/KB/exception/ExceptionHandling.aspx |
3.5 has classes that 2.0 doesn't. Func<...> for instance. If you aim for 2.0, you can't use them. |
The shoes console. Press Alt+/ (or apple+/ on a mac) to see the stack trace of your application. |
Is there a valid <servlet-mapping> for 'MyServlet' in your web.xml? That's been my number one culprit in the past |
Have you considered [pinning][1]? Basically, you can upgrade *some* of your system (i.e. just Subversion and its dependencies) to Lenny, while keeping the rest as Etch.
[1]: http://wiki.debian.org/AptPinning |
Capitalisation rules are different for different languages. In French, month names [should not be capitalised][1].
[1]: http://french.about.com/library/writing/bl-capitalization.htm |
I haven't found any. An obvious *disadvantage*, if you don't need the 3.5 specific features, is that the 3.5 code base is younger and is therefore possible, albeit unlikely, that there is some bug lurking around. |
Getting notified when the page DOM has loaded (but before window.onload) |
|javascript|dom| |
I know there are some ways to get notified when the page body has loaded (before all the images and 3rd party resources load which fires the **window.onload** event), but it's different for every browser.
Is there a definitive cross-browser way (other than polling) to do this? I'd like to achieve this effect without... |
I know there are some ways to get notified when the page body has loaded (before all the images and 3rd party resources load which fires the **window.onload** event), but it's different for every browser.
Is there a definitive way to do this on all the browsers?
So far I know of:
- **DOMContentLoaded** : On ... |
The main difference between the two is the amount of data passed back and forth. Any arguments about the time difference is fundamentally flawed in that "select *" and "select col1, ..., colN" result in the same amount of relative work performed by the DB engine. However, transmitting 15 columns per row vs. 5 columns p... |
What is your measure of "requests/sec"? In other words, what happens for the 31st request? What resource is being blocked? If it is the front-end/servlet/web portion, can you run <tt>em.persist()</tt> in another thread and return immediately?
Also, are you creating transactions each time? Are you creating <tt>En... |
You could translate each string to lowercase once --- lazily only when you need it, or as a prepass to the sort if you know you'll be sorting the entire collection of strings. There are several ways to attach this comparison key to the actual data being sorted, but these techniques should be addressed in a separate is... |
If you prefer the portability, then [boost::tuple][1] is nice:
You would want a tuple of 4 items:
typedef boost::tuple<uint16,uint16,uint16,uint16> VertexID;
You can assign like this:
VertexID id = boost::make_tuple(1,2,3,4);
The boost tuple already has support for comparison, equality, etc., so ... |
If it's a possibility for your app, you might want to look into [couchdb](http://incubator.apache.org/couchdb/). |
Did you try specifying the instance name in the connection string? Apparently sql server express, in particular, is finicky about having the instance name.
I've also started to poke around with the SQL Server Configuration Manager. So did you click into "SQL Server 2005 Network Configuration" and then look at "P... |
The [shelve][1] module appears to work just fine:
<pre><code>
import re
import shelve
a_pattern = "a.*b"
b_pattern = "c.*d"
a = re.compile(a_pattern)
b = re.compile(b_pattern)
x = shelve.open('re_cache')
x[a_pattern] = a
x[b_pattern] = b
x.close()
# ...
x = shelve.open('re_cache')
a = x[a_pattern]
... |
@org 0100h Yes, there are many variables left out of the description of the problem, and all your points are valid ones and should be addressed in the event of an actual implementation.
@chrisofspades It's not meant to replace it, your condition number two ensures that it doesn't have www, which mine doesn't. It wo... |
@org 0100h Yes, there are many variables left out of the description of the problem, and all your points are valid ones and should be addressed in the event of an actual implementation. There are both pros and cons to your proposed regex. On the one hand it's easier and future proof, on the other, do you really want to... |
Here's an interesting white paper on the topic.
http://research.microsoft.com/research/pubs/view.aspx?msr_tr_id=MSR-TR-2006-45
The answer is "It depends." Certainly it would depend upon the database server and its approach to blob storage. It also depends on the type of data being stored in blobs, as well as ... |
Try JVM option **-XX:-UsePerfData**
Performance likely will suffer.
[more info][1]
[1]: http://java.sun.com/performance/jvmstat/faq.html |
Try JVM option **-XX:-UsePerfData**
Performance likely will suffer.
[more info][1]
[1]: http://java.sun.com/performance/jvmstat/faq.html
(sorry for the delete confusion. I did a little searching around and started to doubt my answer.) |
It's a good question... I don't want to lead you astray, so I'm open to other people's answers as much as you are. For me, it really comes down to cost of overhead and what the use of the API is. I prefer consuming web services when creating client software, however I don't like the weight of SOAP. REST, I believe, ... |
|data-structures|homework| |
|algorithm|data-structures|homework| |
First up: hardcore real-time peeps will take issue with the use of ".NET" and "real-time" in the same sentence, due to .NET's non-deterministic nature ;)
Having said that, if you're just implementing a supervisory or visualisation layer over an existing real-time system (say, implementing a SCADA-type system), then... |
At OSCON 2005, I heard Damien Conway say "the only thing better than Perl is something that works well, even if it's not written in Perl."
It's good advice. Instead of looking for the <i>best</i> language that can be compiled to an .EXE, worry a lot more about writing it in <i>a</i> language that can be compiled to... |
Since nobody has mentioned it, you can try [Postmodern][1], which is an interface to PostgreSQL. It aims for a tighter integration with PostgreSQL and so doesn't pretend to portability between databases.
I've put it together with [hunchentoot][2] and [cl-who][3] and built a pretty nice website.
[1]: http://comm... |
What is the most efficient way to count the results of a stored procedure, from another stored procedure? |
|sql-server|t-sql| |
In a stored procedure, I need to get the count of the results of another stored procedure. Specifically, I need to know if it returns any results, or an empty set.
I could create a temp table/table variable, exec the stored procedure into it, and then run a select count on that data. But I really don't care about t... |
The questions I heard wer, how do I estimate the bugs in my software? and what techniques do I use to ensure the quality is good?
Rather than go through a full course, here are a couple approaches.
**How do I estimate the bugs in my software?**
Start with the history, you know how many you found during testing... |
Perforce
What I like about perforce say compared to CVS is that the branch management is must more sophisticated (but still reasonably easy) and you don't need to bug a central bureaucracy to create branches/labels and the like. In other words it allows to an individual team (or developer) to manage their source com... |
How to insert line breaks in HTML documents using CSS |
|html|css| |
I'm writing a web service, and I want to return the data as XHTML. Because it's data, not markup, I want to keep it very clean - no extra <div>s or <span>s. However, as a convenience to developers, I'd also like to make the returned data reasonably readable in a browser. To do so, I'm thinking a good way to go about it... |
> Is it some processing I'm supposed to do server-side after I grab the text from fckEditor?
Precisely. StackOverflow had some early issues related to this as well. The easiest way to solve it is to use an HTML library to parse user's input, and then escape any tags you don't want in the output. Do this as a post-pr... |
the ones that vary less would be the first two, for major.minor, after that it can be anything from build, revision, release, to any custom algorithms (like in some MS products) |
How can I perform HTTP PUT uploads to a VMware ESX Server in PowerShell? |
|http|vmware|powershell|esx| |
VMware ESX, ESXi, and VirtualCenter are supposed to be able to support HTTP PUT uploads since version 3.5. I know how to do downloads, that's easy. I've never done PUT before.
Background information on the topic is here: http://communities.vmware.com/thread/117504 |
Well, it really depends on your metrics and purpose:
1. If you have 250 columns and want to (indeed) select them all, use select * if you want to get home the same day :)
2. If your coding needs flexibility and the table in need is small, again, select * helps you code faster and maintain it easier.
3. If you w... |
I know there are some ways to get notified when the page body has loaded (before all the images and 3rd party resources load which fires the **window.onload** event), but it's different for every browser.
Is there a definitive way to do this on all the browsers?
So far I know of:
- **DOMContentLoaded** : On ... |
There is the RedBook [WebSphere Application Server V6.1: System Management and Configuration][1] with Chapter 14 talking about application deployment, this could help.
[1]: http://www.redbooks.ibm.com/abstracts/sg247304.html?Open |
If you have a number of pages, with all sorts of request variables and whatnot, probably one of the spidering tools the other commenters have mentioned (wget, lwp-mirror, etc) would be the easiest and most robust solution.
However, if the number of pages you need to get is low, or at least _manageable_, you've got a... |
Promising alternatives to make? |
null |
I've been using make and makefiles for many many years, and although the concept
is sound, the implementation has something to be desired.
Has anyone found any good alternatives to make that don't overcomplicate
the problem? |
If you weren't fussed about the time sensitive nature of the comments, you could make use of CakePHP's counterCache functionality by adding a "comment_count" field to the entries table, configuring the counterCache key of the Comment belongsTo Entry association with this field, then call find() on the Entry model. |
As per [W3C spec](http://www.w3.org/TR/CSS2/generate.html#lists),
> The list properties ... do not allow authors to specify distinct style (colors, fonts, alignment, etc.) for the list marker ...
But the idea with a span inside the list above should work fine! |
<ul style="color: red;">
<li>One</li>
<li>Two></li>
<li>Three</li>
</ul>
<ul style="color: red;">
<li>One</li>
<li>Two></li>
<li>Three</li>
</ul> |