instruction stringlengths 0 30k ⌀ |
|---|
I'm cleaning up some old Maildir folders, and finding messages with names like:
1095812260.M625118P61205V0300FF04I002DC537_0.redoak.cise.ufl.edu,S=2576:2,ST
They don't show up in my IMAP client, so I presume there's some semaphore indicating the message already got moved somewhere else. Is that the case, and can ... |
I work in the travel industry and have worked on a number of different PMS's. The last one I designed had the row per guest per night approach and it is the best approach I've come across yet.
Quite often in the industry there are particular pieces of information to each night of the stay. For example you need to know... |
For real world HTML processing I'd recommend [BeautifulSoup][1]. It is great and takes away much of the pain. Installation is easy.
[1]: http://www.crummy.com/software/BeautifulSoup/ |
SVN's post_commit hook is ideal for things like this.
<a href="http://amiworks.co.in/talk/ads-automatic-deployment-script/">ADS (automatic deployment script</a> looks like a solution to this, but I've never tried it - just found it with a few seconds of Googling. |
The biggest problem with singletons is that they make unit testing *hard*, particularly when you want to run your tests in parallel but independently.
The second is that people often believe that lazy initialisation with double-checked locking is a good way to implement them.
Finally, unless your singletons are i... |
Are you looking for an "enterprise" solution or a "home" solution? It is hard to tell from your question, because 2TB is very small for an enterprise and a little on the high end for a home user (especially two servers). Could you clarify the need so we can discuss tradeoffs? |
I would recommend **NAS Storage. (Network Attached Storage).**
HP has some nice ones you can choose from.
http://h18006.www1.hp.com/storage/aiostorage.html
as well as Clustered versions:
http://h18006.www1.hp.com/storage/software/clusteredfs/index.html?jumpid=reg_R1002_USEN |
An implicit cursor is one created "automatically" for you by Oracle when you execute a query. It is simpler to code, but suffers from
- inefficiency (the ANSI standard specifies that it must fetch twice to check if there is more than one record)
- vulnerability to data errors (if you ever get two rows, it raises a... |
An implicit cursor is one created "automatically" for you by Oracle when you execute a query. It is simpler to code, but suffers from
- inefficiency (the ANSI standard specifies that it must fetch twice to check if there is more than one record)
- vulnerability to data errors (if you ever get two rows, it raises a... |
Btrieve without Pervasive? |
|c#|python|btrieve| |
Is there any library available to query Btrieve databases without buying something from Pervasive? I'm looking to code in C# or Python. |
Do you use application frameworks? |
|frameworks|framework| |
Application frameworks such as DotNetNuke, Eclipse, Websphere and so forth are available today which offer customizable frameworks that can be used as dashboard applications. Do you use these or do you and your peers keep writing amazing, modular, maintainable dashboard frameworks which you support yourselves?
Are ... |
Actually, I think query 2's more readable. Think about when you get to say 5,6, or 7 tables when you hit the where clause in query one. Following the joins could get messy.
As for performance, I have no idea. I bet if you go to the MySQL website, there would be info there - probably examples of joins.
Professiona... |
Concerning inheritance, I think you should just let the OO paradigm does its magic.
Specifically, the `GetType()` check should be removed, it might break polymorphism down the line.
|
VisualSVN wants a username and password |
|svn|tortoisesvn|visualsvn| |
I've renamed my server and am trying to get to the VisualSVN repository via TortoiseSVN. In [this post][1] Gordon helped me find the right command - thanks Gordon.
Now VisualSVN is asking me for a username and password. I don't recall setting one and if I did I've forgotten it. Any idea how to reset this username / ... |
Okay, this is VBScript, but even so I'd suggest using the Scripting.FileSystemObject object
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Dim f
Set f = fso.GetFile("C:\testfile.dat") 'actually named "testFILE.dAt"
wscript.echo f.Name
The response I get is from this snippe... |
By setting the Height property on the WrapPanel to the height of the ScrollContentPresenter, it will never scroll vertically. However, if you remove that Binding, it will never wrap, since in the layout pass, it has infinite height to layout in.
I would suggest creating your own panel class to get the behavior yo... |
If you are serious about wanting an exact copy, you probably also want to use the -p switch to scp, if you're using that. I've found that scp **reads from devices**, and I've had problems with cpio, so I personally always use *tar*, like this:
cd /origin; find . -xdev -depth -not -path ./lost+found -print0 \
... |
Here is a code snippet with regular expressions for various needs:
[http://snipplr.com/view/6889/regular-expressions-for-uri-validationparsing/][1]
[1]: http://snipplr.com/view/6889/regular-expressions-for-uri-validationparsing/ |
You can add an event handler to AppDomain.UnhandledException event, and it'll be called when a exception is thrown and not caught. |
I think you are attacking it from the wrong angle by trying to encode all posted data.
Note that a "<" could also come from other outside sources, like a database field, a configuration, a file, a feed and so on.
Furthermore, "<" is not inherently dangerous, its only dangerous in a specific context: when writing... |
I think you are attacking it from the wrong angle by trying to encode all posted data.
Note that a "<" could also come from other outside sources, like a database field, a configuration, a file, a feed and so on.
Furthermore, "<" is not inherently dangerous, its only dangerous in a specific context: when writing... |
I would suggest reading [this blog][1]. The final method seems to work well, your test data shows up in Blend very nicely. Just keep in mind that you have to compile the DLL before it will display the data.
[1]: http://www.galasoft.ch/mydotnet/articles/article-2007091401.html |
Google is mum on what source they use for their traffic data. You might contact them directly to see if they want to implement something for you, but my guess is that they'd simply refer you to their provider if they really wanted your data.
Keep in mind that traffic data is available for more than just the metropo... |
I use git gc after I do a big checkout, and have a lot of new object. it can save space. E.g. if you checkout a big SVN project using git-svn, and do a git gc, you typically save a lot of space |
PHP is not a language designed for multi-threading, and I don't think it ever will be.
If you need mutex functionality, PHP has a [Semaphore][1] functions you can compile in.
Memcache has no mutex capability, but it can be emulated using the [Memcache::add()][2] method.
If you are using a MySQL database, and ... |
best library to do web-scraping |
|language-agnostic|class-library|web-crawler| |
I would like to get data from from different webpages such as addresses of restaurants or dates of different events for a given location and so on. What is the best library I can use for extracting this data from a given set of sites? |
Tree data structure in C# |
|c#|data-structures| |
I was looking for a tree or graph data structure in C# but I guess there isn't on provided. <http://msdn.microsoft.com/en-us/library/ms379574.aspx> explains a bit about why. Is there a convenient library which is commonly used to provide this functionality? Perhaps through a strategy pattern to solve the issues prese... |
I was looking for a tree or graph data structure in C# but I guess there isn't on provided. <http://msdn.microsoft.com/en-us/library/ms379574.aspx> explains a bit about why. Is there a convenient library which is commonly used to provide this functionality? Perhaps through a strategy pattern to solve the issues prese... |
John Rose working on [fixnums][1] in the JVM to fix this problem.
[1]: http://blogs.sun.com/jrose/entry/fixnums_in_the_vm |
***There are better answers already but this is an 'also ran' because it is just another option.***
For the low low price of free you could look at the [Microsoft SQL Server Database Publishing Wizard][1]. This tool allows you to script the schema, data or data and schema. Plus is can be run from a UI or command l... |
On our side, we use to test SWING GUI with [FEST](http://code.google.com/p/fest/). This is an adapter on the classical swing robot, but it ease dramatically its use.
Combined with TestNG, We found it an easy way to simulate "human" actions trough the GUI. |
I've used both. I guess it depends on what your organization values.
Since you are familiar with CC Net, I won't speak much to that. You already know what makes it cool.
**Here's what I like about Team Foundation Build:**
* Build Agents. It's very simple to turn any box into a build machine and run a build on ... |
Include the class definition that's defined in CSS on your javascript version of the <span> tag as well.
<span class="class_defined_in_css"> (where this <span> tag would be part of your javascript code. |
Personally, I'm a fan of [MooTools][1]' animation classes ([Fx.Tween][2], [Fx.Morph][3], [Fx.Transitions][4]). Very straight-forward and easy to use. For more advance animation Fx.Slide, Fx.Scroll and Fx.Elements are also available...
It also has a neat Ajax class (Request) that will take care of all your ajax needs... |
Why not give the paragraph an id and then use Javascript to add the word, or remove it, if necessary? Surely it will retain the same formatting as the paragraph when you insert the word "new", or change the contents of the paragraph entirely. |
Some variation of Lisp that compiles to machine code could be almost as fast as C++ for this kind of programming. The [Naughty Dog][1] team created a version of Lisp called [Game Oriented Assembly Lisp][2], which they used to create several AAA titles, including the Jak and Daxter series. The two major impediments to a... |
I've been using the following simple technique, it's not foolproof. If someone really wants to bypass this, it's easy to look at the source (i.e. not suitable for the google captcha) but it should fool most bots.
Add 2 or more form fields like this:
<input type='text' value='' name='botcheck1' class='hideme' ... |
*Google Maps Hacks* has a hack, ["Hack 62. Find the Latitude and Longitude of a Street Address"][1], for that.
[1]: http://safari.oreilly.com/0596101619/googlemapshks-CHP-7-SECT-2 |
If you're working with U.S. addresses, you can use [geocoder.us][1], which has [APIs][2].
Also, *Google Maps Hacks* has a hack, ["Hack 62. Find the Latitude and Longitude of a Street Address"][3], for that.
[1]: http://geocoder.us/
[2]: http://geocoder.us/help/
[3]: http://safari.oreilly.com/0596101619/... |
CSS : Bad Gray Line to the side of the Navigation Bar on http://perl-begin.org/ |
|html|css| |
I'm maintaining [the Perl Beginners' Site](http://perl-begin.org/) and used a modified template from Open Source Web Designs. Now, the problem is that I still have an undesired artifact: a gray line on the left side of the main frame, to the left of the navigation menu. Here's [an image](http://www.shlomifish.org/Files... |
unable to get wikipedia pages with LWP::Simple |
|perl|wikipedia|lwp|lwpsimple| |
if you are importing to innodb the single most effective thing you can do is to put
innodb_flush_log_at_trx_commit = 2
in your my.cnf, temporarily while the import is running. you can put it back to 1 if you need ACID |
It sounds like you need to include the definition of the Stone class, but it would be impossible to say without more details. Can you narrow down the error by removing unrelated code and post that? |
It's exactly the same as
xmpp.OnLogin += EventHandler(MyMethod);
Where MyMethod is
public void MyMethod(object o)
{
xmpp.Send(new Message(new Jid(JID_RECEIVER), MessageType.chat, "Hello, how are you?"));
} |
Hmm, must read docs harder next time.
var theComposition = app.project.item(1);
var theTextLayer = theComposition.layers[1];
theTextLayer.property("Source Text").setValue("This text is from code");
|
How can I detect from a Swing app that the PC is being shut-down? |
|java|swing|operating-system| |
Well behaved windows programs need to allow users to save their work when they are shutting the PC down.
How can I make my app detect the shutdown event? Any solution should allow the user to abort the shutdown if user selects, say "Cancel".
The normal Swing window closing hook doesn't work, nor does adding a shu... |
Well behaved windows programs need to allow users to save their work when they are shutting the PC down.
How can I make my app detect the shutdown event? Any solution should allow the user to abort the shutdown if user selects, say "Cancel".
The normal Swing window closing hook doesn't work, nor does adding a shu... |
Well behaved windows programs need to allow users to save their work when they are shutting the PC down.
How can I make my app detect the shutdown event? Any solution should allow the user to abort the shutdown if user selects, say "Cancel".
The normal Swing window closing hook doesn't work, nor does adding a shu... |
Report templates for Team Foundation Server 2008 |
|tfs| |
Does anybody have links to site or pre built report running on the SQL Analysis Service provided by TFS2008?
Creating a meaningful Excel report or a new report sometime is a very boring and difficult taks, maybe finding a way to share reports could be a good idea?
|
PHP objects, patterns and practice.
http://www.apress.com/book/view/9781590599099 |
I think you are attacking it from the wrong angle by trying to encode all posted data.
Note that a "`<`" could also come from other outside sources, like a database field, a configuration, a file, a feed and so on.
Furthermore, "`<`" is not inherently dangerous, its only dangerous in a specific context: when wri... |
Is it possible to drag and drop from/to outside a Flash applet with JavaScript? |
|javascript|flash|drag-and-drop| |
Let's say I want a web page that contains a Flash applet and I'd like to drag and drop some objects from or to the rest of the web page, is this at all possible?
Bonus if you know a website somewhere that does that! |
Reserving tables for use only for tabular data works most of the time. There are certain layout problems that are much easier to achieve with tables than anything else. For example, vertical alignment and equal height columns. On the other side of the fence, there have been some complex data tables that I've used float... |
has anyone tried transactional memory for C++ |
|multithreading|c++|transactional-memory|intel|locking| |
I was checking out Intel's "whatif" site and their Transactional Memory compiler (each thread has to make atomic commits or rollback the system's memory, like a Database would), it seems like a promising way to replace locks and mutexes but I can't find many testimonials, anyone here has any input? |
Has anyone tried transactional memory for C++? |
|c++|multithreading|locking|intel|transactional-memory| |
I was checking out Intel's "whatif" site and their Transactional Memory compiler (each thread has to make atomic commits or rollback the system's memory, like a Database would).
It seems like a promising way to replace locks and mutexes but I can't find many testimonials. Does anyone here have any input? |
I would generally have to agree with Skliwz when it comes to doing things in MSSQL. SSIS and DTS are the way to go, but if you are unfamiliar with those technologies they can be cumbersome to work with. However, there is an alternative that would allow you to do the processing in C#, and still keep your data inside of ... |
It depends on the type of debugging that you're trying to do - in particular if you're after a temporary method of tracing or if you are trying to provide a tool that can be used as an indication of status during the life of the project (or product).
For one off, in depth source tracing and debugging an in-circuit d... |
<a href="http://steve-yegge.blogspot.com/2008/08/business-requirements-are-bullshit.html"> Gathering Business Requirements Are Bullshit </a> - Steve Yegge |
No need to edit the file manually. The hint is just above the GUID there:"LaunchCondition".
1. Right click the setup project
2. Select "View" -> "Launch Conditions"
3. Expand the "Launch Conditions" node if it isn't already expanded
4. Right click the ".NET Framework" node and select "Properties Window"
5.... |
The one I use is Oracle Application Development Framework. It's a complete, fully supported framework, and Oracle use it themselves to build their own enterprise applications. It comes with a lot of JSF components that are very easy to bind to the underlying data objects.
I'd recommend this for all Java applications ... |
There's no one right answer. Look at the business need... if you're doing fairly typical things, then starting from an established framework is a good place to start. If you feel you may need some custom components or widgets, look for a framework that's extensible using the knowledge and skills that you have in-hous... |
Is this possible in CSS and javascript? |
|css|javascript| |
I want to use javascript to insert some elements into the current page.
Such as this is the original document:
<p>Hello world!</p>
Now I want to insert an element in to the text so that it will become:
<p>Hello <span id=span1>new</span> world!</p>
I need the span tag becau... |
How to insert a text-like element into document using javascript and CSS? |
|javascript|css| |
The task that will run first is the task that is spawned first as realized by the VxWorks scheduler task. VxWorks uses **priority-based scheduling** by default. So in your case, since T1 and T2 have the same priority, whichever one gets the CPU first will continue to run indefinitely until it is explicitly blocked (usi... |
At work, we try to create from scratch as little as possible. We use Frameworks a lot (maybe not always end to end frameworks). We have used Dot Net Nuke a lot. Another framework we use a lot is CSLA. |
Does Test Driven Development take the focus from Design? |
I'm trying to fetch wikipedia pages using LWP::Simple, but they're not coming back. This code:
#!/usr/bin/perl
use strict;
use LWP::Simple;
print get("http://en.wikipedia.org/wiki/Stack_overflow");
doesn't print anything. But if I use some other webpage, say <code>http://www.google.com</code>... |
|perl|wikipedia|perl-lwp|perl-lwp-simple| |
Unable to get wikipedia pages with LWP::Simple |
|perl|perl-lwp|wikipedia|perl-lwp-simple| |
I'm trying to fetch wikipedia pages using LWP::Simple, but they're not coming back. This code:
#!/usr/bin/perl
use strict;
use LWP::Simple;
print get("http://en.wikipedia.org/wiki/Stack_overflow");
doesn't print anything. But if I use some other webpage, say <code>http://www.google.com</code>... |
I completly agree with zigdon, allow different sites, but only pick up photos from the web. I you still want to allow uploads, and put a cap on size.
Now, if you want to throw yourself into something big, I would suggest putting a cap on size, and then using JQuery (or other library) to work with the images.
Jus... |
Rather than write your own static code analyzer, I recommend you use [FxCop][1]: and instead, write custom FxCop rules for your needs. It'll save you a lot of time.
http://www.binarycoder.net/fxcop/
[1]: http://msdn.microsoft.com/en-us/library/bb429476(VS.80).aspx |
The answer: for some reason Mysql had its tmp tables on the /tmp partition which was limited to 100M, and was filled up by eaccelerator cache to 100M even though eaccel is limited to 16M of usage. Very weird, but I just moved eaccel cache elsewhere and problem solved. |