instruction stringlengths 0 30k ⌀ |
|---|
SELECT RecordID
FROM aTable
WHERE SameDate IN
(SELECT SameDate
FROM aTable
GROUP BY SameDate
HAVING COUNT(SameDate) > 1) |
This may seem obvious, but have you checked that you have at least one valid printer installed and available? |
I have been using the full suite for the last year and a half. I have been very happy with the results. They are easy to use and I haven't run into any issues that I couldn't fix myself (I purchased the source code version).
Definitely recommended. |
MySQL triggers + replication with multiple databases. |
|mysql|triggers|replication| |
|mysql|replication|triggers| |
I am running a couple of databases on MySQL 5.0 and am trying to get my legacy database to sync with a revised schema, so I can run both side by side. I am doing this by adding triggers to the new database but I am running into problems with replication. My set up is as follows.
Server "master"
- Database "lega... |
[swfupload][1], the best tool I know that lets you do that. Simple, easy to use and even has a fallback mechanism for the 1% web users that don't have flash 8+.
[1]: http://www.swfupload.org |
'AjaxControlToolkit' is undefined Error |
|asp.net|javascript| |
I am using the AjaxControlToolkit in VS2005, and it works fine. I do have some issues though, when I go to some pages I have, then click back, I get this javascript error:
'AjaxControlToolkit' is undefined
I have searched MSDN forums, and google, and tried many of the solutions, but none have worked. I have tried... |
You should also consider [phpMinAdmin][1] which is only one file, so its easy to upload and setup.
[1]: http://phpminadmin.sourceforge.net/ |
Yes they should. Lots of other systems, including yahoo, will reject mail from hostnames they can't reverse map to the connecting IP, or that they can't resolve. |
Barcode- and Character Recognition component for .Net |
|.net|ocr|barcode| |
I need to extract and decode barcodes and text from images. Is there any open source library available that helps to accomplish that task? If not, do you know a good commercial product? |
CruiseControl |
There is probably a gem you are missing. Can you provide the stack trace and the line of code where it originates?
Re-run rake with `--trace` to get the stack trace printed.
EDIT: Also what version of Ruby are you running? openssl.rb is in my 1.8.6 install |
Easy one is to just choose two big relative primes a and b, then keep multiplying your random number by a and adding b. Use the low bits as your random number and keep the full value for the next iteration. |
Easy one is to just choose two big relative primes a and b, then keep multiplying your random number by a and adding b. Use the modulo operator to keep the low bits as your random number and keep the full value for the next iteration.
This algorithm is known as the [linear congruential generator](http://en.wikipedia... |
i would say jjrv is right in that tables are excellent for tabular data, going out of your way to make something "work" like a table instead of just using a table is borderline retarded.
if you care about standards, and moving toward a solid implementation across all browsers then most of your markup should be in t... |
I would look into [DeltaXML][1]. It seems to have the features you're looking for. They even have a guide on [how to compare schemas][2].
[1]: http://www.deltaxml.com/
[2]: http://www.deltaxml.com/dxml/library/how-to-compare-schemas.html |
IIf() runs both the true and false code. For simple things like numeric assignment, this isn't a big deal. But for code that requires any sort of processing, you're wasting cycles running the condition that doesn't match, and possibly causing side effects.
[@Dillio-O](#28393): Ternary expressions in C# do not execut... |
IIf() runs both the true and false code. For simple things like numeric assignment, this isn't a big deal. But for code that requires any sort of processing, you're wasting cycles running the condition that doesn't match, and possibly causing side effects.
[@Dillio-O](#28393): Ternary expressions in C# do not execut... |
Since this is a development environment, I agree with Greg, just use trial and error. It's not that crucial to get it perfectly right.
But if you do a lot of work in the VM, why not give it at least half of the 2GB? |
I don't think you'll find Flash or Silverlight is going to help too much for this application. Either way you're going to be utilizing tiled images and the images are going to be the same size in both scenarios. Using Flash or Silverlight may allow you to add some neat animations to the application but anything you g... |
An alternative to making a template is to evolve one by gradually generalising your current project's Ant script so that there are fewer changes to make the next time you copy it for use on a new project. There are several things you can do.
Use ${ant.project.name} in file names, so you only have to mention your app... |
The container itself is allocated where you decide (it can be the stack, the heap, an object's member, etc) but the memory it uses is, by default, as others described, taken on the Free Store (managed through new and delete) which is not the same as the heap (managed through malloc/free).
[Don't mix the two!](http:/... |
The vast majority of .net developers use Visual Studio, but there are a couple of alternatives.
[Visual Studio Express Editions][1] are free and give you a cut down version of Visual Studio which you can use with a single language, i.e. VB or C# or C++.
[SharpDevelop][2] is probably the best free alternative to ... |
I think you would need to create a trigger and store all changes to the table in a separate table. You can then use this table to get the revision history. |
I think the question is what 'similar' means to you. If you create a field for user to input some kind of tags, it becomes much more easier to query. |
In my company we use [Pegasus][1]. Its great
[1]: http://www.pegasusimaging.com |
Take a look at [CodeProject: .NET TWAIN image scanning][1] That might give you a good start.
[1]: http://www.codeproject.com/KB/dotnet/twaindotnet.aspx |
You should look at this [article][1]. Also you could look into [Flex Data Services][2]. Usually Flex is more suited for application that need a lot of access to data, but for simple things in flash you should use some Xml data sources, and write the xml source yourself in something like php, asp, python, perl etc.. lik... |
You can take advantage of full text search capability of MSSQL 2005
-- Assuming @Title contains title of current articles you can find related articles runnig this query
SELECT * FROM Acticles WHERE CONTAINS(ArticleTitle, @Title) |
First of all you need to define what article similarity means.
For example you can associate some meta information with articles, like tags.
To be able to find similar articles you need to extract some features from them, for example you can build full text index.
You can take advantage of full text search cap... |
I am running a couple of databases on MySQL 5.0.45 and am trying to get my legacy database to sync with a revised schema, so I can run both side by side. I am doing this by adding triggers to the new database but I am running into problems with replication. My set up is as follows.
Server "master"
- Database "... |
Some free ones:
- [XCode on the Mac][1]
- [Eclipse][2]
- [Lazarus (Open Source clone of Delphi)][3]
- [Visual Studio Express
Editions][4]
[1]: http://developer.apple.com/tools/xcode/
[2]: http://www.eclipse.org/
[3]: http://www.lazarus.freepascal.org/
[4]: http://www.microsoft.com/expre... |
Note that if typing `if ( exists $hash{ key } )` isn’t too much work for you (which I prefer to use since the matter of interest is really the presence of a key rather than the truthiness of its value), then you can use the short and sweet
@hash{@key} = (); |
A scripting language doesn't have a standard library or platform (or not much of one). It's small and light, designed to be embedded into a larger application. Bash and Javascript are great examples of scripting languages because they rely absolutely on other programs for their functionality.
---
You also ask why... |
A scripting language doesn't have a standard library or platform (or not much of one). It's small and light, designed to be embedded into a larger application. Bash and Javascript are great examples of scripting languages because they rely absolutely on other programs for their functionality.
Using this definition, ... |
Any HTTP proxies with explicit, configurable support for request/response buffering and delayed connections? |
|caching|mobile|proxy|nginx|squid| |
When dealing with mobile clients it is very common to have multisecond delays during the transmission of HTTP requests. If you are serving pages or services out of a prefork Apache the child processes will be tied up for seconds serving a single mobile client, even if your app server logic is done in 5ms. I am looking ... |
Another thing to keep in mind, you may also want to compare their respective VMs.
Comparing the CLR and Java VM will give you another way to differentiate between the two.
For example, if doing heavy multithreading, the Java VM has a stronger memory model than the CLR (.NET's equivalent). |
it seems you need to make the ruby header file
go into the openssl directory and:
ruby extconf.rb
cd ../..
make
make install
See [here][1]
[1]: http://www.ruby-forum.com/topic/90083 |
The problem was where the DLLs were located:
* c:\dlls\managed.dll
* c:\dlls\wrapper.dll
* c:\exe\my.exe
Apparently, the CLR won't look for managed DLLs in the path of the unmanaged DLL and will only look for it where the executable is. (or in the GAC).
For reasons not worth going into, this is the structure... |
What you want to do is to specify the sha1 of the commit you want to restore to. You can get the sha1 by examining the reflog (`git reflog`) and then doing
`git reset --hard <sha1 of desired commit>`
But don't wait too long... after a few weeks git will eventually see that commit as unreferenced and delete all ... |
I just tried Consolas and Envy - Envy seems "too narrow" to my eyes, but Consolas looks great (I am on a mac). Thanks for the tips ! |
How should I load files into my Java application? |
|java| |
How should I load files into my Java application? |
This is how they're doing it right here on Stack Overflow:
<link rel="shortcut icon" href="/favicon.ico" /> |
svec:
Oh, you're right, I guess PHP must convert array index strings to numbers if they contain only digits. I tried this code:
$array = array('1' => 100, '2' => 200, 1 => 300, 2 => 400);
print_r($array);
And the output was:
Array([1] => 300 [2] => 400)
I've done some more tests and found... |
I used JFreeChart (<http://www.jfree.org/jfreechart/>) on a previous project. It has some very good built-in capabilities, and the design was WAY extensible so you could always roll your own extension later if you needed some custom chart annotation or wanted an axis to render differently, or whatever. It's definitel... |
see @svec and @jeremy above. All array indices are of type 'int' first, then type 'string', and will be cast to that as PHP sees fit.
Performance wise, $index should be faster than "$index" and "{$index}" (which are the same).
Once you start a double-quote string, PHP will go into interpolation mode and treat ... |
see @svec and @jeremy above. All array indices are of type 'int' first, then type 'string', and will be cast to that as PHP sees fit.
Performance wise, $index should be faster than "$index" and "{$index}" (which are the same).
Once you start a double-quote string, PHP will go into interpolation mode and treat ... |
Depends why MyClass2 isn't serializable.
If there's some good reason why MyClass2 can't be represented in a serialized form, then chances are good the same reason applies to MyClass, since it's a subclass.
It may be possible to write a custom serialized form for MyClass by implementing readObject and writeObject,... |
Depends why that member of MyClass2 isn't serializable.
If there's some good reason why MyClass2 can't be represented in a serialized form, then chances are good the same reason applies to MyClass, since it's a subclass.
It may be possible to write a custom serialized form for MyClass by implementing readObject a... |
Does such a procedure exist in a Scheme standard and if yes, how is it called? |
|scheme|mapping| |
I looked for the name of a procedure, which applies a tree structure of procedures to a tree structure of data, yielding a tree structure of results - all three trees having the same structure.
Such a procedure might have the signature:
<pre>(map-tree data functree)</pre>
Its return value would be the resu... |
Start gdb without specifying the executable or core file, then type the following commands:
set solib-absolute-prefix ./usr
file path/to/executable
core-file path/to/corefile
You will need to make sure to mirror your library path exactly from the target system. |
Start gdb without specifying the executable or core file, then type the following commands:
set solib-absolute-prefix ./usr
file path/to/executable
core-file path/to/corefile
You will need to make sure to mirror your library path exactly from the target system. The above is meant for debugging targ... |
The problem was where the DLLs were located.
* c:\dlls\managed.dll
* c:\dlls\wrapper.dll
* c:\exe\my.exe
I confirmed this by copying managed.dll into c:\exe and it worked without issue. Apparently, the CLR won't look for managed DLLs in the path of the unmanaged DLL and will only look for it where the executabl... |
Suppose you have COMPANY and EMPLOYEE. COMPANY has many EMPLOYEES (i.e. EMPLOYEE has a field COMPANY_ID).
In some O/R configurations, when you have a mapped Company object and go to access its Employee objects, the O/R tool will do one select for every employee, wheras if you were just doing things in straight SQL, ... |
When using Bash, the first of `~/.bash_profile`, `~/.bash_login` and `~/.profile` will be run for an interactive login shell. I believe `~/.profile` is generally run by Unix shells besides Bash. Bash will run `~/.bashrc` for a non-login interactive shell.
I typically put everything I want to always set in `.bashrc` ... |
No this is terrible. It leaks test into your production code (even if its conditioned off)
Bad bad. |
Well, for one thing, getAsConst *must* be called when the 'this' pointer is const -- not when you want to receive a const object. So, alongside any other issues, it's subtly misnamed. (You can still call it when 'this' is non-const, but that's neither here nor there.)
Ignoring that, getAsConst earns you nothing, a... |
Microsoft have an API all about scanning. It's called [Windows Image Acquisition][1] and you can read a great Coding4Fun article about it by none other than Scott Hanselman [here][2].
[1]: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wia/wia/overviews/startpage.asp
[2]: http://blogs.msdn.c... |
Here's an additional observation if you're worried about micro optimisation. Decrementing loops can 'possibly' be more efficient than incrementing loops (depending on instruction set architecture e.g. ARM), given:
> for (i = 0; i < 100; i++)
On each loop you you will have one instruction each for:
1. Adding 1... |
Well, it seems the problem there is the way (and order) in which you assign the ports.
Basically, *:80 means "use port 80 for all hosts in this configuration". When you do this, Apache tries to bind that host to 0.0.0.0:80, which means that host will receive every single packet coming to the machine through port 80... |
SQL Server doesn't keep track of changes so it can't tell you this.
The only way you may be able to do this is if you had a copy of all the scripts applied to the database.
In order to be able to capture this information in the future you should look at DDL triggers (v2005+) which will enable you to record change... |
For me, " _business logic_ " makes up all the entities that represent data applicable to the problem domain, as well as the logic that decides on "what do do with the data"..
So it should really consist of "data transport" (not access) and "data manipulation".. Actually data access (stuff hitting the DB) should be i... |
That's probably the way to do it, without resorting to something more advanced like using setuptools to install the files where they belong.
Notice there's a problem with that approach, because on OSes with real a security framework (UNIXes, etc.) the user running your script might not have the rights to access the ... |
We have had similar requirements, and what we found was that often times the user just wants to **see** what has been changed, not necessarily roll back any changes.
I'm not sure what your use case is, but what we have done was create and Audit table that is automatically updated with changes to an business entit... |
|sharepoint| |
Hallo, i need to fire an event (or start a workflow) when the permissions of a List-Element (ListItem) have been changed. "ItemUpdating" / "ItemUpdated" won't fire (since the ListItem itself is not updated, i suppose), so how can it be done? Thanks in advance! |
Surely the OP was a bit of a wind up, the arguments seem so week and easily countered.
Web pages are the domain of web developers, and if they say div & CSS is better than tables that's good enough for me.
If a layout is achieved by tables generated by a server app, then a new layout means changes to the app, a... |
This is probably not the solution you want, but just to help you with the log parsing, you can use this to get counts for each from the logs (assuming you're on a linux server) :
grep -c \.swz web_log_dir/*
grep -c \.swf web_log_dir/* |
If you're using PHP with GD support, you can try [getimagesize()][1].
[1]: http://au2.php.net/manual/en/function.getimagesize.php |
Getting the absolute path to `$0` or `__FILE__` is what you want. The only trouble is if someone did a `chdir()` and the `$0` was relative -- then you need to get the absolute path in a `BEGIN{}` to prevent any surprises.
FindBin tries to go one better and grovel around in the `$PATH` for something matching the `ba... |
Primes parallel algorithm : http://www.cs.cmu.edu/~scandal/cacm/node8.html |
I have solved this problem using the <a href="http://en.wikipedia.org/wiki/Observer_pattern">Observer Pattern</a> and a central <a href="http://en.wikipedia.org/wiki/Model-view-controller">Controller</a>. The central controller is the only class that has knowledge of all widgets in the application and determines the wa... |
Any Ruby code to do this in a real application is probably going to be painfully slow. I would try and hunt down unix tools to do the job. This is one of the beauties of using Mac OS X, it has very fast PDF capabilities built-in. The next best thing is probably a unix tool. |
Any Ruby code to do this in a real application is probably going to be painfully slow. I would try and hunt down unix tools to do the job. This is one of the beauties of using Mac OS X, it has very fast PDF capabilities built-in. The next best thing is probably a unix tool.
Actually, I've had some success with rt... |
Before XMLHTTPRequest became widely used, people were using a combination of JavaScript and iframes to serve up content in a dynamic fashion without doing full page refreshes.
There's lots of information about developing sites this way so you should have a relatively easy time of it finding workaround to a lot of t... |
This is annoying, but if you're willing to add another level of redirection, you can often do the following to push down into the pointer-to-pointer:
char c = 'c';
char *p = &c;
char **a = &p;
const char *bi = *a;
const char * const * b = &bi;
It has a slightly different meaning, but it'... |
How do I examine the configuration of a remote git repository? |
|git|git-svn| |
I've got a git-svn clone of an svn repo, and I want to encourage my colleagues to look at git as an option. The problem is that cloning the repo out of svn takes 3 days, but cloning from my git instance takes 10 minutes.
I've got a script that will allow people to clone my git repo and re-point it at the original SV... |
To unit test your code you will need to mock up an object of the UI interface element. There are many tools you can use to do this, and I can't recommend one over another. There's a good comparison between MoQ and Rhino Mocks here [at Phil Haack's blog][1] that I've found useful and might be useful to you.
Anothin... |
Check the docs. It's not a Y2K issue -- it's a lack of a Y2K issue! This decision was made originally in C and was copied into Perl, apparently JavaScript, and probably several other languages. That long ago it was apparently still felt desirable to use two-digit years, but remarkably whoever designed that interface... |
Use tables for lowest-common denominator html or for tabular data where it makes sense to span across columns or rows. Otherwise css layouts are much less verbose and much easier to maintain once you get the hang of it. |
Some extra info about this can be found at the blog post: [Subversion Obliterate, the missing feature](http://blogs.quintor.nl/bbottema/2008/03/01/subversion-obliterate-the-forgotten-feature/)
Be sure to read through the comments too, where Karl Fogel puts the article into perspective :-) |
If you wish to run _one_ script and _only_ one script, you can make it that users default shell.
echo "/usr/bin/uptime" >> /etc/shells
vim /etc/passwd
* username:x:uid:grp:message:homedir:/usr/bin/uptime
can have interesting effects :) ( its not secure tho, so don't trust it too much. nothin... |
I am a fan of Pegasus Imaging's Barcode Xpress
www.jpg.com
|
I found that the best way to upload a bunch of files is to zip them and upload a single file (and then decomress it on server). However that's probably not a good option for the audience you are targeting. |
Usually in All Users directory (C:\Documents and settings\All Users) there are shortcuts that appear everywhere. If you want only in the Administrator group you should put it in C:\Documents and settings\Administrator or whatever the name of the user is (This can probably be found during instalation - which requires ad... |
The best I have found is the "Error Message Guide" from Business Objects. [http://help.sap.com/businessobject/product_guides/boexir2/en/xir2_ErrMsgGde_en.pdf][1]
If you can't find the error code in that guide then you end up having to deal with standard debugging of an undocumented application.
1. Read the mess... |