instruction
stringlengths
0
30k
Such a handler must be registered in HKCR\Directory\Background, instead of usual locations like HKCR\Directory, HKCR\Folder, etc. Check out [Creating Shell Extension Handlers][1] in MSDN. [1]: http://msdn.microsoft.com/en-us/library/cc144067(VS.85).aspx
If it's on a single machine, Named Pipes gives you better performance and can be implemented with the [remoting infrastructure](http://ivanweb.com/articles/namedpipes/index.cfm) as well as WCF. Or you can justdirectly use [System.IO.Pipes](http://bartdesmet.net/blogs/bart/archive/2007/04/12/getting-started-with-named-p...
How do you maintain large t-sql procedures
|sql-server|t-sql|maintainability|
I'm about to inherit a set of large and complex set of stored procedures that do monthly processing on very large sets of data. We are in the process of debugging them so they match the original process which was written in VB6. The reason they decided to re write them in t-sql is because the vb process takes days a...
If you're looking for client-side check out [flotr][1] which is based on prototype javascript library or [flot][2] which is based on jQuery. Both work well, though flot seems like its got a bigger backing. [1]: http://solutoire.com/flotr/ [2]: http://code.google.com/p/flot/
W3Schools seems to have a good Javascript events reference: [http://www.w3schools.com/jsref/jsref_events.asp][1] [1]: http://www.w3schools.com/jsref/jsref_events.asp
First off, I think there has already been some great answers, so I will try not to dupe too much. - Get them to write lots of code, keep them asking questions to keep the brain juices flowing. - I would say dont get bogged down with the *really* detailed information until they either run in to the implications ...
I've used both, but I have to agree with Justin Standard that you shouldn't really consider rewriting your existing tests to any new format. Regardless of the decision, it is pretty trivial to run both. TestNG strives to be much more configurable than JUnit, but in the end they both work equally well. TestNG has a...
Here is a pretty good JavaScript event reference with the elements they are for: <http://www.globalguideline.com/JavaScript_Guide/Java_Script_Events.php>
I know that there's a way to set php.ini values for that script with a certain command, I thus went looking and found this too - [Goto last post on page][1] I also found the following post which may be of use - [Goto last post on the page][2] I will add to this more if nobody has found an answer but I must now ca...
We upsize (either using the upsize wizard or by hand) users to SQL server. It's usually pretty straight forward. Replace all the access tables with linked tables to the sql server and keep all the forms/reports/macros in access. The investment in access isn't lost and the users can keep going business as usual. You get...
We upsize (either using the upsize wizard or by hand) users to SQL server. It's usually pretty straight forward. Replace all the access tables with linked tables to the sql server and keep all the forms/reports/macros in access. The investment in access isn't lost and the users can keep going business as usual. You get...
We upsize (either using the upsize wizard or by hand) users to SQL server. It's usually pretty straight forward. Replace all the access tables with linked tables to the sql server and keep all the forms/reports/macros in access. The investment in access isn't lost and the users can keep going business as usual. You get...
I'm not sure if you're supposed to ask your homework questions here... ;) A multitasking OS allows you to run multiple processes (tasks) "simultaneously". They do not actually run at the same time, of course, since there is only one CPU. What happens is that one process runs for a while, then the OS breaks in (throu...
The Html Agility Pack has been mentioned before - if you are going for speed, you might also want to check out [the Majestic-12 HTML parser][1]. Its handling is rather clunky, but it delivers a really fast parsing experience. [1]: http://www.majestic12.co.uk/projects/html_parser.php
By putting: @Context private UriInfo context; in your HelloWorld class, can you access the context.getQueryParameters() ; method to get a map of parameters? [http://docs.sun.com/app/docs/doc/820-4867/ggrby?a=view][1] Seems to suggest you can :) [1]: http://docs.sun.com/app/docs/doc...
There's always the possibility to actually create the model file and set var $useTable = false. If this is not what you're asking for and the model and its associations actually do exist, but Cake seems to be unable to find them, you'll have to triple check the names of all models and their class names in both the a...
A bit overkill, and only something to attempt with certain repository products that can handle it, but a hook script to call indent or [astyle][1] could do the trick. It'll format everyone's code the same way for every file, depending how you write the hook script, and it'd have to be pre-commit of course. [1]: ...
Do you mean something like this: in your code behind: protected string GetPostBack() { return ClientScript.GetPostBackEventReference(this, null); } and in your aspx: <a href="javascript:<%=GetPostBack() %>">Click here to postback</a>
Actually AS3 is much better.. more like C# or Java, with consistent API, naming, packages. It is pleasure to use AS3 while using AS2 is often hell. And that's the problem. If you are used to AS2 with it quirks, hacks needed here and there.. fast and dirty ways.. then AS3 isn't simple to get used to. But in long run ...
Same way the [cron][1] does it? Recording both start and end time that way. [1]: http://en.wikipedia.org/wiki/Cron#Fields "Cron fields"
How can I use multiple sitemap file without multiple root nodes
|asp.net|menu|sitemap|
I'm using a ASP.NET menu control. I'd like the menu to look like this, where link 1 through 10 are in one sitemap file and link 11 through 20 in another. root --link 1 (...) --link 10 --link 11 (...) --link 20 However, sitemap file MUST have a root <siteMapNode> which I cannot s...
Take a look at <a href="http://www.jumpbox.com/">JumpBox</a>. I've had conversations with them on the topic, and they seem to have a solution that will work soon for Rails apps.
Use session variables or HTTP POST instead of HTTP GET.
Is ther an OpenFile||FolderDialog object in .NET?
.Net remoting isn't a protocol in and of itself. It lets you pick which protocal to use: SOAP, named-pipes, etc.
JDEdwards XMLInterop
|jdedwards|
Wondering if anybody out there has any success in using the JDEdwards XMLInterop functionality. I've been using it for a while (with a simple PInvoke, will post code later). I'm looking to see if there's a better and/or more robust way. Thanks.
You don't mention what the target project is; having a process per-tab does not necessarily mean more "robust" code at all. You should aim to write solid code with tests regardless of portability - just read about writing good C++ code :) As for the portability section, make sure you are testing on both platforms fr...
As a matter of fact I would go so far as to say that unless you have complete control over the data, then no translation process would ever work. So I second storing the original data either as an attribute or a child node.
Validate server certificate with LWP?
|perl|lwp|https|ssl|
How can I get [LWP](http://search.cpan.org/perldoc?LWP) to verify that the certificate of the server I'm connecting to is signed by a trusted authority and issued to the correct host? As far as I can tell, it doesn't even check that the certificate claims to be for the hostname I'm connecting to. That seems like a ma...
|perl|perl-lwp|https|ssl|
How can I get [LWP](http://search.cpan.org/perldoc?LWP) to verify that the certificate of the server I'm connecting to is signed by a trusted authority and issued to the correct host? As far as I can tell, it doesn't even check that the certificate claims to be for the hostname I'm connecting to. That seems like a ma...
How can I get [LWP](http://search.cpan.org/perldoc?LWP) to verify that the certificate of the server I'm connecting to is signed by a trusted authority and issued to the correct host? As far as I can tell, it doesn't even check that the certificate claims to be for the hostname I'm connecting to. That seems like a ma...
Embeded resource is the best way and you don't need to use the ScriptManager to render it out (as AJAX is not configured OoB on SharePoint), you can just render it as any other client script resource (through the ClientScriptManager). Best idea is the have an if ContainsScriptManager else UsClientScriptManager style...
There's a good series of posts by [Jeremy Miller][1] in relation to MVC/MVP triad. In particular you might be interested in [part 6][2] it goes into detail about the comms between the view and the controller. [1]: http://codebetter.com/blogs/jeremy.miller/archive/2007/07/25/the-build-your-own-cab-series-table-of...
>>> s = "2+24*48/32" >>> p = re.compile(r'(\W+)') >>> p.split(s)
If you just want to play around with it, I'd suggest the Arduino platform ([http://www.arduino.cc][1]). It's based on the ATmega168 or ATmega8, depending on the version. It uses a C-like language and has its own IDE. [1]: http://www.arduino.cc
Although this example is not compilable and complete, the basic idea is to have a class that tells kSOAP how to turn an XML tag into an object (i.e. readInstance()) and how to turn an object into an XML tag (i.e. writeInstance()). public class MarshalBase64File implements Marshal { public static Cla...
look at the percentage of time spent in each subsection of the plan, and consider what the engine is doing. for example, if it is scanning a table, consider putting an index on the field(s) that is is scanning for
The output of the explain tells you how long each step has taken. The first thing is to find the steps that have taken a long time and understand what they mean. Things like a sequential scan tell you that you need better indexes - it is mostly a matter of research into your particular database and experience.
From the dinosaur OS book ("Applied operating System Concepts"): **Time sharing,** or **multitasking**, is a logical extension of multiprogramming. The CPU executes multiple jobs by switching among them, but the switches occur so frequently that the users can interact with each program while it is running.
One "Oh no, that's not right" is often in the form of a **table scan**. Table scans don't utilize any special indexes and can contribute to purging of every useful in memory caches. In postgreSQL, for example, you will find it looks like this. Seq Scan on my_table (cost=0.00..15558.92 rows=620092 width=78) ...
Error Console in Firefox. Although, it gives **all** CSS errors, so you have to read through it.
The <a href="http://perldoc.perl.org/perlipc.html">perlipc documentation</A> covers many ways that you can do this, including IPC::Open2 and IPC::Open3.
Basically, you take a look at each operation and see if the operations "make sense" given your knowledge of how it should be able to work. For example, if you're joining two tables, A and B on their respective columns C and D (A.C=B.D), and your plan shows a clustered index scan (SQL Server term -- not sure of the o...
This depends on what you mean by 'good' and 'bad'. Basically you need to realise that every index you add will increase performance on any search by that column (so adding an index to the 'lastname' column of a person table will increase performance on queries that have "where lastname = " in them) but decrease write ...
Another respondent (McDowell) said that polymorphism only works for object instances. That should be qualified; there are languages that do treat classes as instances of a "Class" or "Metaclass" type. These languages do support polymorphism for both instance and class (static) methods. C#, like Java and C++ before...
> I believe from a performance > perspective that $array["$index"] is > faster than $array[$index] See Best > practices to optimize PHP code > performance Don't believe everything you read so blindly... I think you misinterpreted that. The article says $array['index'] is faster than $array[index] where index is...
Junit vs TestNG
|java|junit|testng|testing|
At work we are currently still using Junit3 to run our tests. We have been considering switching over to Junit4 but I have been keeping an eye on TestNG for a while now. What experiences have you all had with either Junit4 or TestNG and which seems to work better for very large numbers of tests. By large, I mean about ...
At work we are currently still using Junit3 to run our tests. We have been considering switching over to Junit4 for new tests being written but I have been keeping an eye on TestNG for a while now. What experiences have you all had with either Junit4 or TestNG and which seems to work better for very large numbers of te...
|java|testing|junit|testng|
At work we are currently still using Junit3 to run our tests. We have been considering switching over to Junit4 for **new** tests being written but I have been keeping an eye on TestNG for a while now. What experiences have you all had with either Junit4 or TestNG and which seems to work better for very large numbers o...
getResource is fine, but using relative paths will work just as well too, as long as you can control where your working directory is (which you usually can). Furthermore the platform dependence regarding the separator character can be gotten around using [File.separator][1], [File.separatorChar][2], or [System.getPr...
|c#|.net|filedialog|
Is it possible to use the [`OpenFileDialog`][1] class select a file OR folder? It appears only to allow the selection of a file, if you select a folder and then choose open it will navigate to that folder. If the `OpenFileDialog` can not be used for this is there another object I should be using? **EDIT**: The s...
Is there an OpenFile||FolderDialog object in .NET?
Is there an OpenFileOrFolderDialog object in .NET?
Is it possible to use the [`OpenFileDialog`][1] class select a file OR folder? It appears only to allow the selection of a file, if you select a folder and then choose open it will navigate to that folder. If the `OpenFileDialog` can not be used for this is there another object I should be using? **EDIT**: The s...
open source syntax highter tool
|c++|xhtml|html|css|open-source|
I'm looking for an open source, cross platform 9windows & linux at least) command line tool to take some code (C++, but multiple languages would be sweet), and spit out valid a XHTML representation of that code, with syntax highlighting included. Ideally the XHTML should just wrap the code with `<span>` and `<div>` ...
|open-source|syntax-highlighting|
[Vim][1] can save any code it highlights to "colored" HTML (it runs on several platforms). There is [GNU hightlight][2] too. And tons of others. [1]: http://www.vim.org/ [2]: http://www.gnu.org/software/src-highlite/
Thanks for both of your replies. Unfortunately, my main development environment is Linux + GDC + Tango, so I don't have conio.h, since I don't use DMC as my C compiler. And I also found both getc() and getchar() is also line buffered in my development environment, so it could not achieve what I wish I could do. ...
They can be useful for unit testing so that when writing tests you know what to expect the function to throw when it fails, but there is no enforcement surrounding them in the compiler. I think that they are extra code that is not necessary in C++. Which ever you choose all that you should be sure of is that you foll...
I don't think you'll find the answers to all those problems in only one book. I've never seen any decent, comprehensive website on algorithms, so I'd recommend you to stick to the books. That said, you can always get some introductory material on canonical algorithm texts (there are always three I usually recommend: [C...
A nice choice would be PIC18 by Microchip - It has quite alot of material, documentation, tutorials and projects on the internet - Free IDE and compiler. - you can pull your own flash writer in a few minutes. (Although for a debugger to work you'll need to work harder) - If you're a student (or has a stude...
imake produces Makefiles by running cpp, the C preprocessor, which usually has a variety of builtin definitions. You can get a list by running gcc -E -dM emptyfile.c.
For specific technologies such as Hibernate, Java, JPA, LDAP (OpenLDAP in particular), Log4J, anything Apache: they all have wikis and/or forums associated with the product that are usually more helpful than a Google search for learning. Many even come with tutorials and you should try them.
XCOPY /D ? xcopy c:\olddir\*.java c:\newdir /D /E /Q /Y
XCOPY /D ? xcopy c:\olddir\*.java c:\newdir /D /E /Q /Y
Safecall passes parameters from right to left, instead of the pascal or register (default) from left to right With safecall, the procedure or function removes parameters from the stack upon returning (like pascal, but not like cdecl where it's up to the caller) Safecall implements exception 'firewalls'; esp ...
Safecall passes parameters from right to left, instead of the pascal or register (default) from left to right With safecall, the procedure or function removes parameters from the stack upon returning (like pascal, but not like cdecl where it's up to the caller) Safecall implements exception 'firewalls'; esp ...
According to [these][1] [threads][2] at mapforums.com the slowness of ActiveX startup is well known and unavoidable (though the question of threading to help with GUI responsiveness is still open. One thing suggested was to abandon the ActiveX version in favor of the MapPoint.Application object instead. Hope that...
Header file guards necessitate macros. Are there any other areas that **necessitate** macros? Not many (if any). Are there any other situations that benefit from macros? YES!!! One place I use macros is with very repetitive code. For example, when wrapping C++ code to be used with other interfaces (.NET, CO...
How do you get the root namespace of an assembly?
|perl|ssl|https|perl-lwp|
How can I get [LWP](http://search.cpan.org/perldoc?LWP) to verify that the certificate of the server I'm connecting to is signed by a trusted authority and issued to the correct host? As far as I can tell, it doesn't even check that the certificate claims to be for the hostname I'm connecting to. That seems like a ma...
You really, really don't want to do what Chrome is doing, it requires a process manager which is probably WAY overkill for what you want. You should investigate using smart pointers from Boost or another tool that will provide reference counting or garbage collection for C++. Alternatively, if you are frequently ...
Killer DateTime Utility for ASP.net
|asp.net|date|
I was wondering if anyone could suggest a utility library that has useful functions for handling dates in ASP.NET easily taking away some of the leg work you normally have to do when handling dates? Subsonic Sugar has some really nice functions: http://subsonichelp.com/html/1413bafa-b5aa-99aa-0478-10875abe82ec.ht...
DateTime Utility for ASP.net
I was wondering if anyone could suggest a utility library that has useful functions for handling dates in ASP.NET easily taking away some of the leg work you normally have to do when handling dates? Subsonic Sugar has some really nice functions: http://subsonichelp.com/html/1413bafa-b5aa-99aa-0478-10875abe82ec.ht...
What are the semantics of a const member function?
|c++|methods|constants|
I understand that the function is not allowed to change the state of the object, but I thought I read somewhere that the compiler was allowed to assume that if the function was called with the same arguments, it would return the same value and thus could reuse a cached value if it was available. e.g. class obj...
This question is pretty general. There are many ways to go about collision detection in a 2d game. It would help to know what you are trying to do. As a starting point though, there are pretty simple methods that allow for detection between circles, rectangles, etc. I'm not a huge fan of gamedev.net, but there ar...
Strict aliasing is not allowing different pointer types to the same data.
Strict aliasing is not allowing different pointer types to the same data. [This article][1] should help you understand the issue in full detail. [1]: http://www.cellperformance.com/mike_acton/2006/06/understanding_strict_aliasing.html
Lagerdalek, The warning is generated because you need to cast the item from the Items collection back into the orginal type that was bound to the combo box, before comparing; otherwise you may get unexpected results as the compiler warns. Here is an example: myComboBox.DataSource = Collection<Car>; So i...