instruction stringlengths 0 30k ⌀ |
|---|
How can I get all items from a specific calendar (for a specific date).
Lets say for instance that I have a calendar with a recurring item every Monday evening. When I request all items like this:
CalendarItems = CalendarFolder.Items;
CalendarItems.IncludeRecurrences = true;
I only get 1 item...
Is ... |
Else, use something like a LightBox based solution like [Thickbox][1]?
[1]: http://codylindley.com/Javascript/257/thickbox-one-box-to-rule-them-all |
As far as I know, ODBC drivers are just DLL's which implement a specific set of functions. So if you have the sources available, you can use Visual Studio to debug it. Here is an article which seems to be something in the right directions: [Debugging DLL Projects in Visual Studio 2005][1].
[1]: http://aspallianc... |
> You'll want to use the SmtpClient class as outlined [here][2].
There are no gotchas - sending email is about as easy as it gets.
An extensive [System.Net.Mail FAQ][1] is located [here][1].
[1]: http://www.systemnetmail.com/default.aspx "System.Net.Mail FAQ"
[2]: http://msdn.microsoft.com/en-us/library/s... |
You can take a look at the [BASS library][1].
It has add-ons, such as BASSWMA and BASSEnc for doing encoding/decoding.
All its API's are accessible from .NET using the [BASS.Net][2] wrapper.
Both BASS and BASS.Net could be licensed for commercial use, with a reasonable fee (€100 each).
[1]: http://www.un4se... |
Are the classes public? |
One thing that is really unique about Haskell is that there is a mailing list exactly for beginners. Go to [Haskell-Beginners](http://www.haskell.org/mailman/listinfo/beginners).
Reading books is good, but having some humans to ask is always a great resource, too. Together, I think there is absolutely no reason to s... |
I had once similar problem. The problem was that I forgot to declare my test class with _public_ modifier. |
Thank you all for your kind suggestions. We checked them all out, but after careful consideration we decided to roll our own with a combination of CruiseControl, NAnt, MSBuild and MSDeploy.
This article has some great information:
[Integrating MSBuild with CruiseControl.NET ][1]
Here's roughly how our solution w... |
Thank you all for your kind suggestions. We checked them all out, but after careful consideration we decided to roll our own with a combination of CruiseControl, NAnt, MSBuild and MSDeploy.
This article has some great information:
[Integrating MSBuild with CruiseControl.NET ][1]
Here's roughly how our solution w... |
Thank you all for your kind suggestions. We checked them all out, but after careful consideration we decided to roll our own with a combination of CruiseControl, NAnt, MSBuild and MSDeploy.
This article has some great information:
[Integrating MSBuild with CruiseControl.NET ][1]
Here's roughly how our solution w... |
yeah..... alice is quite interesting.... but scratch is like alice but simpler. Targets a younger age group I think.
But the UI would be perfect for simple scripting |
Depends on what you mean by fastest.
If you mean "simple to code", in .NET you can use the BitArray class and refer to each bit as a boolean true/false.
[BitArray Class](http://msdn.microsoft.com/en-us/library/system.collections.bitarray.aspx) |
Neither. The User dials a Phone Number on a Phone. |
As the 2 previous posters said, ImageMagick's probably the easiest way to generate the thumbnails.
You could exec something like:
´convert -size 300x300 doc.pdf doc.png´
(The backquotes tell Ruby to shell it out).
If you don't want to use exec to do the conversion you could use the RMagick gem to do it ... |
If there are really only 4 bits, then the fastest method would certainly involve a lookup table. There are only 16 different possibilities after all. |
I believe FirePHP required you install a Firefox extension (in addition to Firebug) that watches for the HTTP headers and puts them in the console.
If that isn't the problem then I'd recommend grabbing a copy of [Charles][1]. It will let you view the headers of the HTTP response. The FirePHP output should be visibl... |
Using 'set -o vi' from the command line, or better, in .bashrc, puts you in vi editing mode on the command line. You start in 'insert' mode so you can type and backspace as normal, but if you make a 'large' mistake you can hit the esc key and then use 'b' and 'f' to move around as you do in vi. cw to change a word. Par... |
Access is a COM application. Use COM, not Windows API. to test things in Access.
The best Test environment for an Access Application is Access. All of your Forms/Reports/Tables/Code/Queries are available, there is a scripting language similar to MS Test (Ok, you probably don't remember MS Test), there is database en... |
Yes, sure you need another class like UserGroupBridge. Another good side-effect is that you can modify user membership and group members without loading potentially heavy User/Group objects to NHibernate session.
Cheers. |
export LESS="-X" prevents less (less is more) from clearing the screen at the end of a file. |
I prefer reading man pages in vi, so I have the following in my .profile or .bashrc file
man () {
sought=$*
/usr/bin/man $sought | col -b | vim -R -c "set nonumber" -c "set syntax=man" -
} |
Yafray (http://www.yafray.org/) might be a good first choice to consider for general 3D rendering. It's reasonably fast and the results look great. It can be used within other software, e.g. the Blender 3D modeler. The license is LPGL.
If the server-side software happens to be written in Python, and the desired ... |
GUID Behind the Scenes |
|guid| |
I am wondering, what goes into the creation of a GUID. I don't mean what is used to create a GUID in a specific language (NewID() in SQL, new GUID() in C#), I mean when you call those methods/functions, what do they do to make the GUID? |
Take a look at the [Java Advanced Imaging API][1]. There are a number of algorithms implemented in that API for doing color reduction.
[1]: http://java.sun.com/javase/technologies/desktop/media/jai/ |
Run both files through the following Perl script, then use diff -iw to do a case-insensitive, whitespace-ignoring diff.
#! /usr/bin/perl -w
use strict;
undef $/;
my $html = <STDIN>;
while ($html =~ /\S/) {
if ($html =~ s/^\s*<//) {
$html =~ s/^(.*?)>// ... |
I'm pretty sure WSDL is the way to do this. |
C# ListView mouse wheel scroll without focus |
|c#|.net|scroll|listvew| |
I'm making a WinForms app with a ListView set to detail so that several columns can be displayed.
I'd like for this list to scroll when the mouse is over the control and the user uses the mouse scroll wheel. Right now, scrolling only happens when the ListView has focus.
How can I make the ListView scroll even whe... |
Note that dropdown menus in some browsers (*ahem*IE*ahem) cannot be zPositioned at all. You'll need to use an "iframe shim" to obscure it or hide the dropdown entirely if you want to position something above it. See: [http://clientside.cnet.com/wiki/cnet-libraries/02-browser/02-iframeshim][1]
[1]: http://clients... |
The details of GUIDs, including the algorithm used to generate them is described on [wikipedia][1].
[1]: http://en.wikipedia.org/wiki/Globally_Unique_Identifier |
I solved a similar issue where I was hosting a 3rd party WinForms control in my WPF application. I created a WPF control that renders the WinForms control in memory and then paints it to a bitmap. Then I use DrawImage in the OnRender method to draw the rendered content. Finally I routed mouse events from my control ... |
Hash function. Its complicated.
<http://en.wikipedia.org/wiki/GUID#Algorithm> Knows more than I do. |
At the risk of helping someone who wants to deploy popup ads (which is bound to fail due to most popup blockers anyway), why can't you just have the subdomains load pages that load the block of Javascript the advertisers give you? |
How do I set up a custom build step in Visual Studio 6? |
|customization|vs6| |
Unfortunately it looks like for various reasons I'm going to have to use Visual Studio 6 instead of a newer version of VS.
It's been a long time since I've used it. I'm looking through its menus and don't see any obvious way to set up any custom build steps (pre-build, post-build, pre-link... anything would help act... |
dotNet can be, because of the CLR which is similar in function to the JVM.
But i dont believe MS had any intention of it being.
<a href="http://www.mono-project.com/Main_Page">http://www.mono-project.com/Main_Page</a>
might be useful, but its not a MS product.
Btw, much like how the wide spectrum of j2ee contain... |
Uninstall Command Fails Only in Release Mode |
|c#|installation| |
I am able to successfully uninstall a third-party application via the command line and via a custom Inno Setup installer.
Command line Execution:
MSIEXEC.exe /x {14D74337-01C2-4F8F-B44B-67FC613E5B1F} /qn
Inno Setup Command:
[Run]
Filename: msiexec.exe; Flags: runhidden waituntilterminated;
... |
|c#|installation|service| |
I think it would have to work like [gabbly.com][1], which sucks in other websites and displays them with its own content over it.
Once you read the other site in and were ready to display it, you couldn't really do it "in PHP"; you would have to send an HTML redirect meta-tag:
<meta HTTP-EQUIV="REFRESH" conte... |
I don't think that that really does work out the number of elements in a structure. If the structure is packed and you used things smaller than the pointer size (such as char on a 32-bit system) then your results are wrong. Also, if the struct contains a struct you are wrong too! |
Subversion is still a much more used version control system, which means that it has better tool support. You'll find mature SVN plugins for almost any [IDE][1], and there are good explorer extensions available (like TurtoiseSVN). Other than that, I'll have to agree with [Michael][2]: Git isn't better or worse than ... |
If you need to worry about keeping things like formatting strings, quotes, and other "cruft" in the text, as code would likely have, then the special characters need to be completely escaped first - otherwise on submission the db, they might end up causing an invalid command to be issued.
Most scripting languages ha... |
I suspect StackOverflow is storing text in markdown format in arbitrarily-sized 'text' column. Maybe as UTF8 (but it might be UTF16 or something. I'm guessing it's SQL Server, which I don't know much about).
As a general rule you want to store stuff in your database in the 'rawest' form possible. That is, do all you... |
Check out this blog posting ([Obscure "svn mv" problem solved][1])... I typically just remove the directory and grab fresh sources.
[1]: http://news.e-scribe.com/145 |
- There's the **[nobr][1]** html tag; not sure how well-supported this is, though.
- You could use css **overflow:visible** and non-breaking spaces between your elements (images), but no other whitespace in the html for those lines.
[1]: http://devedge-temp.mozilla.org/library/manuals/1998/htmlguide/tags1... |
Definitely not. You should find the correct place to **handle** the exception (actually do something, like catch-and-not-rethrow), and then log it. You can and should include the entire stack trace of course, but following your suggestion would litter the code with try-catch blocks. |
[MochiKit][1] has the following functions (included here with full namespace resolution):
MochiKit.Logging.logDebug() // prefaces value with "DEBUG: "
MochiKit.Logging.log() // prefaces value with "INFO: "
MochiKit.Logging.logError() // prefaces value with "ERROR: "
MochiKit.Logging.logFatal()... |
There used to be an excellent article from Eric Gunnerson on MSDN "The well-tempered exception" but it seems to have been pulled. The URL was:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp08162001.asp
Aydsman's answer is correct, more info here:
http://msdn.microsoft.com... |
|security|web-services|rest| |
I am trying to write an application that uses pretty URLS or REST (still learning what this entails). Anyway my urls look like www.foo.net/some_url/some_parameter/some_keyword. I can be sure a url will never exceed N characters. Should I validate the url length with every request in order to protect against buffer over... |
The static will mean you get one copy per file, but unlike others have said it's perfectly legal to do so. You can easily test this with a small code sample:
test.h:
static int TEST = 0;
void test();
test1.cpp:
#include <iostream>
#include "test.h"
int main(void) {
std::cou... |
Not sure if I understand the entire context but it sounds like you have 1 single database backing this? Why not make use of the database's locking: if creating the customer is a single INSERT then this statement alone can serve as a lock since the database will reject a second INSERT that would violate one of your cons... |
How can you get database specific performance metrics for things like CPU/Memory/etc. in SQL Server 2005? |
|sql-server|performance|optimization|sql-server-2005| |
I have a couple databases on a shared SQL Server 2005 cluster instance, that I would like performance metrics on. I have some processes that run for a very long time and suspect that code inefficiencies, rather than insufficient hardware are to blame.
I would like some way to get these performance metrics so that I ... |
I found the problem that I had with the relationships/associations not showing in the views. It seems that you have to go through each class in the dbml and set a primary key for views as it is unable to extract that information from the schema. I am in the process of setting the primary keys now and am planning to go ... |
You could tackle the problem from a completely different angle: enable the perl module and you can include a little perl script in your httpd.conf. You could then do something like this:
<Perl>
my @groups = qw/ foo bar baz /;
foreach ( @groups ) {
push @PerlConfig, qq| <Directory /home/www/$... |
Jeff Atwood posted [an interesting aerticle][1] about this subject some time ago. Allthough a .NET exception is converted to a SoapFault, which is compatible with most other toolkits, the information in the faults isn't very good. Therefor, the conlusion of the article is that .NET webservices don't throw very good exc... |
Yup. You just build up a char* and execute it. However, you need to note a couple details. The char* must be in an executable section of memory and must have proper alignment.
In addition to nanojit you can also check out LLVM which is another library that's capable of compiling various program representations down ... |
You can use the RotateTransform and TranslateTransform that are available on the Graphics class. Because using DrawString is GDI+ the transforms affects the drawing. So use something like this...
g.RotateTransform(45f);
g.DrawString("My String"...);
g.RotateTransform(-45f);
Don't forget to reverse t... |
You can build a tree structure using a foreign key that references the same table (a "pig's ear" relationship as it is often known). Then you can use the CONNECT BY syntax to traverse the tree. Here is a simple example:
SQL> create table qs
2 ( q_id integer primary key
3 , parent_q_id integer r... |
Please help me with my .NET abstract classes. |
|.net|inheritance|abstract-class| |
I'm designing a web site navigation hierarchy. It's a tree of nodes.
Most nodes are pages. Some nodes are links (think shortcuts in Windows).
Most pages hold HTML content. Some execute code.
I'd like to represent these as this collection of classes and abstract (MustInherit) classes…
![class diagr... |
I'm designing a web site navigation hierarchy. It's a tree of nodes.
Most nodes are pages. Some nodes are links (think shortcuts in Windows).
Most pages hold HTML content. Some execute code.
I'd like to represent these as this collection of classes and abstract (MustInherit) classes…
![class diagr... |
I'm designing a web site navigation hierarchy. It's a tree of nodes.
Most nodes are pages. Some nodes are links (think shortcuts in Windows).
Most pages hold HTML content. Some execute code.
I'd like to represent these as this collection of classes and abstract (MustInherit) classes…
![class diagr... |
This is not doable in a PHP script, unless you want to edit the redirect.... PHP is a back end technology; you're going to need to do this in Javascript or the like.
The best you're going to do, as far as I know, is to create a text file on your web server and load a different HTTP address based on time out of that... |
In the C99 standard, this is covered by the following rule in 6.5-7:
> An object shall have its stored value accessed only by an lvalue expression that has one of
the following types:73)
> - a type compatible with the effective type of the object,
> - a qualified version of a type compatible with the effectiv... |
How to force browser to reload updated XML file? |
|xml| |
I am developing a website that relies much on XML data. The web site has an interface where user can update data. The data provided by user will be updated to the respective XML file. However, the changes is not reflected until after 1 or 2 minutes.
Anyone knows how to force the browser to load the latest XML file i... |
Dave Webb is correct, and you can see this by adding a print statement:
>>> class X:
... l = []
... def __init__(self):
... print 'inited'
... self.__class__.l.append(1)
...
Then as soon as you type the period in `X().` it prints `inited` p... |
The limitation is imposed by the syslog itself, not the appender.
I do not know about log4net, but [NLog][1] works perfectly ok with "shared" file target - i.e. multiple processes can write in one and the same [file][2].
[1]: http://www.nlog-project.org/
[2]: http://www.nlog-project.org/target.File.html |
I have always been in the fortunate position to have Red Gate [Schema compare][1] which i think would do what you ask. Cheap at twice the price!
[1]: http://www.red-gate.com/products/SQL_Compare/index.htm |
Compute the [Fréchet distance](http://www.cim.mcgill.ca/~stephane/cs507/Project.html#what) on each pair of tracks. The distance can be used to gauge the similarity of your tracks.
*Math alert:* Fréchet was a pioneer in the field of [metric space](http://en.wikipedia.org/wiki/Metric_space) which is relevant to your p... |
The named scopes already proposed are pretty fine. The clasic way to do it would be:
names = ["dave", "jerry", "mike"]
date = DateTime.now
Person.find(:all, :conidtions => ["created_at > ? AND name IN ?", date, names])
|
You could define a constant with the path to the root directory of your project, and then put that at the beginning of the path. |
Object Mocking is used to keep dependencies out of your unit test.
Sometimes you'll have a test like "SelectPerson" which will select a person from the database and return a Person object.
To do this, you would normally need a dependency on the database, however with object mocking you can simulate the interaction... |
Object Mocking is used to keep dependencies out of your unit test.
Sometimes you'll have a test like "SelectPerson" which will select a person from the database and return a Person object.
To do this, you would normally need a dependency on the database, however with object mocking you can simulate the interaction... |
> Do I need a Mock Object Framework?
Certainly not. Sometimes, writing mocks by hand can be quite tedious. But for simple things, it's not bad at all. Applying the principle of [Last Responsible Moment][1] to mocking frameworks, you should only switch from hand-written mocks to a framework when you've proved to you... |
> Do I need a Mock Object Framework?
Certainly not. Sometimes, writing mocks by hand can be quite tedious. But for simple things, it's not bad at all. Applying the principle of [Last Responsible Moment][1] to mocking frameworks, you should only switch from hand-written mocks to a framework when you've proven to you... |
This should work
$root = dirname(__FILE__) . "/..";
include "$root/inc/include1.php"; |
This should work
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
include "$root/inc/include1.php";
----------
**Edit:** added imporvement by [aussieviking][1]
[1]: http://stackoverflow.com/questions/4369/include-files-requiring-an-absolute-path#4388 |
Whether or not you a mocking framework is useful depends in part on the language of the code you're writing. With a static language, you need to put in extra effort in order to trick the compiler into accepting your mock objects as a replacement for the real thing. In a dynamically-typed language such as Python, Ruby... |
I haven't been exposed to the Singleton as much as some of the other posters have, but nearly all implementations that I have seen (in C#) could have been achieved with static classes/methods. I suppose you could argue that a static class is an implementation of the singleton pattern, but that's not what I've been seei... |
To add on to what James A. N. Stauffer and cynicalman said - I would bet that there is another log4j.xml / log4j.properties on your classpath other than the one you wish to be used that is causing log4j to configure itself the way it is.
`-Dlog4j.debug` is an absolute killer way to troubleshoot any log4j issues. |
If you're using Visual C++, then you should have a look at this:
http://channel9.msdn.com/shows/Going+Deep/STL-Iterator-Debugging-and-Secure-SCL/
and the links from that page, which cover the various costs and options of all the debug-mode checking which the MS/Dinkware STL does.
If you're going to ask such a ... |
Also, [RFC 4122][1] (which is referenced in the Wikipedia article) describes how GUIDs should be built.
[1]: http://www.ietf.org/rfc/rfc4122.txt |
I decided to go with the new ASP.net Routing.
Why not urlRewriting? Because I don't want to change the clean URL that routing gives to you.
Here is the code:
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs on application startup
RegisterRoutes(RouteTab... |
How do you write a C# Extension Method for a Generically Typed Class |
|c#|asp.net-mvc|generics|extension-methods| |
This should hopefully be a simple one.
I would like to add an extension method to the System.Web.Mvc.ViewPage< T > class.
How should this extension method look?
My first intuitive thought is something like this:
namespace System.Web.Mvc
{
public static class ViewPageExtensions
{
... |
This should hopefully be a simple one.
I would like to add an extension method to the System.Web.Mvc.ViewPage< T > class.
How should this extension method look?
My first intuitive thought is something like this:
namespace System.Web.Mvc
{
public static class ViewPageExtensions
{
... |