instruction
stringlengths
0
30k
If you try this, what happens? >>> print myresolver.query('sources.org', 'ANY', 'RRSIG')
I don't think so... I've seen similar issues in Visual Studio 2008 working on web projects where the build and rebuild would fail time after time. I knew that my changes shouldn't have affected the build so I just kept cleaning and building each of the individual projects in my solution until finally (and I do mean fin...
This study has already been funded by Microsoft, and unfortunately the results only seem to be online in a Word Document. The document is hosted on this blog: http://blog.mastykarz.nl/best-practices-for-developing-accessible-web-sites-in-microsoft-office-sharepoint-server-2007/ And the path to the document is he...
If you're using SQL-Server then you should use a distributed transaction, since both MSMQ and SQL-Server support it. What happens is you wrap your database write in a TransactionScope block and call scope.Complete() only if it succeeds. If it fails, then when your WCF method returns the message will be placed back into...
If you're using SQL-Server then you should use a distributed transaction, since both MSMQ and SQL-Server support it. What happens is you wrap your database write in a TransactionScope block and call scope.Complete() only if it succeeds. If it fails, then when your WCF method returns the message will be placed back into...
From my experience import/export is probably the way to go. Export creates a logical snapshot of your DB so you won't find it useful for big DBs or exacting performance requirements. However it works great for making snapshots and whatnot to use on a number of machines. I used it on a rails project to get a prod s...
From my experience import/export is probably the way to go. Export creates a logical snapshot of your DB so you won't find it useful for big DBs or exacting performance requirements. However it works great for making snapshots and whatnot to use on a number of machines. I used it on a rails project to get a prod s...
pthread_cond_wait versus semaphore
|pthreads|c|semaphore|
What are the pros / cons of using `pthread_cond_wait` or using a semaphore ? I am waiting for a state change like this : pthread_mutex_lock(&cam->video_lock); while(cam->status == WAIT_DISPLAY) { pthread_cond_wait(&cam->video_cond, &cam->video_lock); } pthread_mutex_un...
|c|multithreading|semaphore|
With Vim on Windows use Ctrl-Q in place of Ctrl-V
What are the options for extracting data out of Hyperion 7.3 with SSIS
That is an image. (see it here: http://perl-begin.org/images/background.gif) It's set in the BODY class of your stylesheet.
Delphi Out of resources
|delphi|linker|
Every project I compile with Delphi 7, in which I do ***not*** compile with run-time packages, gives a linker error: "Too many resources". Even a blank application gives this error. In other words: Delphi died on me.
Python has a pretty good IPC library: see <a href="http://docs.python.org/lib/ipc.html">http://docs.python.org/lib/ipc.html</a>
A simple solution could be: - Place the divergent classes outside of your normal classpath. - Write a simple custom classloader and install it in main as your default. - For all classes apart from the 5/6 ones the cassloader can defer to its parent (the normal system classloader) - For the 5/6 ones (which...
Unfortunately there is no tag in the standard JSP/JSTL libraries that I know of that would allow you to do this date calculation. The simplest, and most inelegant, solution is to just use some scriptlet code to do the calculation. You've already stated that you think this is a clunky solution, and I agree with you....
I think it's this: #page-container { border-left: solid 1px rgb(150,150,150); border-right: solid 1px rgb(150,150,150); } However, I'm not seeing why the right border isn't showing up....
With explicit cursors, you have complete control over how to access information in the database. You decide when to OPEN the cursor, when to FETCH records from the cursor (and therefore from the table or tables in the SELECT statement of the cursor) how many records to fetch, and when to CLOSE the cursor. Information a...
If you need to keep it "forever" probably the safest way is to print out the code and stick that in a plastic envelope to keep it safe from the elements. I can't tell you how much code I've lost to a backup means which are no longer reachable.... I don't have a paper card reader to read my old cobol deck, no drive for...
Ok now that you have put it that way, I assume you are use TCP for remoting, for if it was via HTTP, it would be a WebException thrown when failing to connect to the (TCP network port) server. When the server has not launched the application program to register the channel on that designated TCP port, you will get a So...
Yes it's possible with mod_rewrite. There are tons of good mod_rewrite tutorials online a quick Google search should turn up your answer in no time. Basically what you're going to want to do is ensure that the regular expression you use is just looking for digits and no other characters and to ensure the length i...
As we have all the artifacts and construction in the same tree we have something like: - Trunk - Planning&Tracking - Req - Design - Construction - Bin - Database - Lib - Source - Deploy - QA - MA
Check this out: http://www.glish.com/css/2.asp And replace the width: xx% for #maincenter by a fixed value. Seems to work when I change it with Firebug, worth a shot? #maincenter { width: 200px; float:left; background:#fff; padding-bottom:10px; }
Every form has "Opacity" property. Set it to 50% (or 0.5 from code) so will be half transparent. Remove borders and show it maximized before the form you want to have focus. You can change BackColor of the form or even set background image for different effects.
1. How are you querying the remote data? 2. How often does it change? 3. Are the results something that could be cached for a period of time? 4. How long a period of time are we actually talking about here? The 'best method' is likely to depend in some way on the answers to these questions...
- I would avoid putting in numeric OIDs and instead use 'OID names' and leave that hard work (of translating) to whatever SNMP API you are using. If that is not possible, then it is okay to use OIDs as they should not change per the SNMP MIB guidelines. Unless the device itself changes but that requires a new MIB...
I have played this game before. I don't necessarily think parallel processing is the way to go. You have shared objects in the game (levers, boxes, elevators, etc) that will need to be shared between processes, possibly with every delta, thereby reducing the effectiveness of the parallelism. I would personally jus...
I'd recommend just creating an entirely separate model for this. class Assignment(Model): user = ForeignKey(User) role = ForeignKey(Role) event = ForeignKey(Event) This lets you do all the usual model stuff, such as user.assignment_set.filter(role__name="Chaperon") role....
Just to point out; if this is a personal (home) server, as opposed to one in a corporate environment, then it's better not to bother hosting it - you won't necessarily have the bandwidth, and your ISP may not allow it. As mentioned above, you will also need a static IP address, and you'll need to set up DNS records ...
Does anyone use Iron speed designer for rapid asp.net development?
|asp.net|gui-designer|ironspeed|
Visual studio is pretty good but doesn't create stored procedures automatically. Iron Speed designer does supposedly. But is it any good?
In C# .NET 2.0, what's an easy way to do a foreach in reverse?
|c#|.net|collections|iteration|
Lets say I have a Dictionary object: Dictionary myDictionary<int, SomeObject> = new Dictionary<string, SomeObject>(); Now I want to iterate through the dictionary in reverse order. I can't use a simple for loop because I don't know the keys of the dictionary. A *foreach* is easy: foreach (SomeObject ob...
The first way is better because it's simpler.
In my situation mocks work **really nice.** But I'm using Python, which is so dynamic that it makes many things involving testing much, much easier. In situation like yours, when application is mainly **data-driven** (as far as I see), mocks may not be as useful. Just passing data in and watching it come out should ...
The best way is to run checks as you develop so you know where your pain points are. The next step maybe to start with a minimal masterpage so you can choose what elements are presented to the user. More advanced you can override the render methods to remove or change bits of the page that are not compliant with yo...
D2009 uses UTF-16 for the default string type, although you can make variables UTF-8 if you need to. Jan Goyvaerts [discusses the size/speed tradeoff][1] in a good blog post. String literals in DFMs have been UTF-8 since at least D7. Hence, there will be no increase in size due to strings in DFMs with D2009. ...
CFLayoutArea is a new AJAX tag added with ColdFusion version 8. (In addition to tags like CFWindow, CFDiv, etc.) Within the AJAX-loaded content of any of these new tags, external JavaScript must be included from the containing page. In your case, that would be the page that includes the &lt;cflayout&gt; tag. Try ...
IIRC gcc could create dependency files.
HTTP POST question - I'm stuck
|http|forms|
I have to POST some parameters to a URL outside my network, and the developers on the other side asked me to not use HTTP Parameters: instead I have to post my key-values in **HTTP Headers**. The fact is that I don't really understand what they mean: I tried to use a ajax-like post, with XmlHttp objects, and also I ...
I have to POST some parameters to a URL outside my network, and the developers on the other side asked me to not use HTTP Parameters: instead I have to post my key-values in **HTTP Headers**. The fact is that I don't really understand what they mean: I tried to use a ajax-like post, with XmlHttp objects, and also I ...
|https|forms|
|http|forms|
I have to POST some parameters to a URL outside my network, and the developers on the other side asked me to not use HTTP Parameters: instead I have to post my key-values in **HTTP Headers**. The fact is that I don't really understand what they mean: I tried to use a ajax-like post, with XmlHttp objects, and also I ...
The whole point of using locks is to ensure that two threads don't try to access the same resource. If you can guarantee that through some other mechanism, go for it.
How do you customize the copy/paste behavior in Visual Studio 2008?
|visual-studio-2008|copy-paste|
How do you customize the Copy/Paste behavior in Visual Studio 2008? For example I create a new `<div id="MyDiv"></div>` and then copy and paste it in the same file. VisualStudio pastes `<div id="Div1"></div>` instead of the original text I copied. It is even more frustrating when I'm trying to copy a group of ...
I personally like the [WWW::Mechanize][1] Perl module for these kinds of tasks. It gives you an object that is modeled after a typical web browser, (i.e. you can follow links, fill out forms, or use the "back button" by calling methods on it). For the extraction of the actual content, you could then hook it up to [H...
Drupal's include system should keep everything relatively lightweight as long as you only include what you need. Despite the fact that it comes with a smattering of modules, what you choose to enable is all that will be included at runtime. If you have to get under the hood and make modifications, I'm also a firm beli...
Reflector will decompile the IL and produce C# for you, it will be rough, but a decent start.
I tend to use setters when a value is write-only or there are multiple values to be set at once (obviously). Also my instinct, like yours, is to use getters and setters as a signal that a process may be long-running, spawn threads, or do some other non-trivial work. Also, if a setter has non-obvious prerequisites in th...
Forget the Getter and Setter methods. Just use Properties. An interesting thing to mention is that Properties are ending up as Setter and/or Getter method(s) in the assembly. Setter and/or Getter become a Property just by a little bit of metadata. So in fact, properties = setter/getter methods.
There is the [POCO Data][1] library, which supports ODBC, MySQL and SQLite. Part of the free open source [POCO C++ Libraries][2]. [1]: http://pocoproject.org/poco/wiki/tiki-index.php?page=DataUserManual [2]: http://pocoproject.org
Rather than changing the generated endpoint, uou could add a second endpoint and binding definition with the configuration you need, then in your code just put the name of the new endpoint in your service client constructor.
Yes, you're looking for the program 'xwininfo'. Run it in another terminal and then click on the window you want info about and it will give it to you. Hope this helps! Frank Wiles Revolution Systems www.revsys.com
At first I would test events like this: private bool fired; private void HandlesEvent(object sender, EventArgs e) { fired = true; } public void Test() { class.FireEvent += HandlesEvent; class.PErformEventFiringAction(null, null); Assert.IsT...
Assuming the information is not sensitive then you could store the information in a cookie which would reduce the amount of information required to be stored server side. This would also allow you to access the information via JavaScript. Alternatively you could use the viewstate to store the information although t...
Best way to switch between multiple versions of the Flash player for easier testing?
|flash|browser|
Are there any utilities or browser plugins that let you easily switch the version of the Flash player that is being used?
After briefly glossing over the description, I think you have the right idea, I would have a state object that holds the state data, and place this into a linked list...I don't think you need parallel threads... as far as the graphics API, I have only used opengl, and can say that it is pretty powerful and has a goo...
Regular expressions.
How to make the taskbar blink my application like Messenger does when a new message arrive
|windows|winapi|
Is there an API call in .NET or a native DLL that I can use to create similar behaviour as Windows Live Messenger when a response comes from someone I chat with.
|ssis|etl|essbase|hyperion|
We need to get data out of some Hyperion cubes (databases) using SSIS. Are there any connection managers available for this? Has anyone done this?
Thanks guys for your messages. The error was on my part. For hover event, I was not passing function for "out". Therefore the handler was passed as undefined in jQuery.event function and that causing error for statement , if ( !handler.guid ) written at 1834 line of jquery-1.2.6.js file. While using I thoug...
Defining class methods in PHP
|php|
Is it possible in PHP (as it is in C++) to declare a class method OUTSIDE the class definition?
It permits incompetent or evil programmers to write unreadble code. Therefor, only use this feature if you are neither incompetent nor evil.
> all I want is the autoindented line to have exactly the same indentation characters as the previous line. [`:help copyindent`](http://www.vim.org/htmldoc/options.html#%27copyindent%27)
> all I want is the autoindented line to have exactly the same indentation characters as the previous line. # [`:help copyindent`](http://www.vim.org/htmldoc/options.html#%27copyindent%27) > ## ['copyindent'](http://www.vim.org/htmldoc/options.html#%27copyindent%27) ['ci'](http://www.vim.org/htmldoc/options.html#...
here are 2 sites that provide documentation and samples for both http://www.systemwebmail.com/ http://www.systemnetmail.com/
delete all other text editor apps. Then you will have to learn it.
The best options are to use FxCop or StyleCop and write custom rules if necessary.
I'm looking to use Visual Studio to write and compile using the open source version of Qt4.
|qt|visual-studio-2008|
Does anyone have details in setting up Qt4 in Visual Studio 2008 for use in editing and compiling? I already know that the commercial version of Qt has applications to this end. I also realize that I'll probably need to compile from source as the installer for the open source does not support Visual Studio and inst...
|visual-studio-2008|qt|
Does anyone have details in setting up Qt4 in Visual Studio 2008? Links to other resources would be appreciated as well. I already know that the commercial version of Qt has applications to this end. I also realize that I'll probably need to compile from source as the installer for the open source does not support V...
Not myself, but a lot of the games released by [ABA Games][1] are written in D 1.x, though I imagine the console ports had to be rewritten in C++. I've written quite a few game prototypes in D, but I'm not sure if that qualifies as 'real world' since I wrote them for my own benefit and have never released any of them. ...
Modify an xml files in a jar file with Java
|java|jakarta-ee|jboss|jar|
I currently am tasked with updating an XML file (persistance.xml) within a jar at a customers site. I can of course unjar the file, update the xml, then rejar the file for redeployment. I would like to kind these command line operations in a Swing App so that the person doing it does not have to drop to the command l...
My high school math teacher lent me a copy of http://www.amazon.com/Are-Your-Lights-Figure-Problem/dp/0932633161 that I have re-read many times. It has been invaluable, as a developer, and in life generally.
It was removed in Visual Studio 2005. I'm trying to find a source for this.
I'm not a fan of putting java code in your jsp. I'd use a static method and a taglib to accomplish this. Just my idea though. There are many ways to solve this problem. public static Date addDay(Date date){ //TODO you may want to check for a null date and handle it. Calendar cal = Calendar....
Check out Boost.Units: [link text][1] It provides zero-overhead Dimensional analysis through operator overloading. How much clearer can this get? quantity<force> F = 2.0*newton; quantity<length> dx = 2.0*meter; quantity<energy> E = F * dx; std::cout << "Energy = " << E << endl; wou...
I've used it off and on for the last few years, I think its a great window manager, but I keep crawling back to kde3 whatever I use. Its however difficult to put into quantifiable terms why this happens, but its right up there with the gnome-vs-kde battle. Neither side can understand the other. I would also j...