instruction
stringlengths
0
30k
Given an absolute or relative path (in a Unix-like system), I would like to determine the full path of the target after resolving any intermediate symlinks. Bonus points for also resolving ~username notation at the same time. If the target is a directory, it might be possible to chdir() into the directory and then c...
|shell|scripting|symlink|
What namespace implements
|c#|namespace|.net|
both Context.Handler and Server.Transfer? I think one may include both and my hunt on MSDN returned null. Thank you.
|c#|namespace|.net|candidatefortitleediting|
|c#|namespace|.net|candidate-for-title-edit|
|c#|namespace|.net|candidate-for-title-edit|httpserverutility|
@graham > You could run it through PGP and store it encrypted in memory and unencrypt it as needed. Massive performance hit. Then you'd have to hold the key in memory. That would make it a little harder, but definitely not impossible. Anyone motivated will still manage to get the data from memory.
Stop beating on VC6. It's old. The STL was updated in 1996 from HP code written in 1994. C++ was ratified in 1998. What is the code doing when you are breaking? Can you reduce the situation into a simple test. When I try that I usually find the cause. If you can do that so it still happens then I'll take a look at i...
What's in your .procmailrc
|unix|email|procmail|.procmailrc|
Are there any handy general items you put in your .procmailrc file?
In your route, get rid of the {paramName} part of the URL. It should be: TestController.mvc/TestAction As that is the URL you want the request to route to. Your form will then post to that URL. Posted form values are mapped to parameters of an action method automatically, so don't worry about not having that ...
Shelve in TortoiseSVN?
|svn|tortoisesvn|
I've moved from TFS to SVN (TortoiseSVN) with my current company. I really miss the "Shelve" feature of TFS. I've read various articles on how to "Shelve" with SVN, but I've read nothing that gives a very simple experience to "shelve" work. Ideally, I'd like extra items added to the TortoiseSVN context menu - "Shelv...
I've moved from TFS to SVN (TortoiseSVN) with my current company. I really miss the "Shelve" feature of TFS. I've read various articles on how to "Shelve" with SVN, but I've read nothing that gives a very simple experience to "shelve" work. Ideally, I'd like extra items added to the TortoiseSVN context menu - "Shelv...
In my opinion: 1. Table names should be plural. 2. Column names should be singular. 3. No. 4. Either CamelCase (my preferred) or underscore_separated for both table names and column names. However, like it has been mentioned, any convention is better than no convention. No matter how you choose to ...
This is more of a comment than an answer, but wouldn't: XmlDocument doc = new XmlDocument(); doc.Load("path"); Read the entire file at once? Just thought I should raise the point since from the look of Thomas' question, he is concerned about reading large files and wants to break the process down..
My first thought on this is "how generate N vectors in a space that maximize distance from each other." You can see that the RGB (or any other scale you use that forms a basis in color space) are just vectors. Take a look at [Hypercube Point Picking][1], and the like from Wolfram's [Random Point Picking][2]. Hope this ...
My first thought on this is "how generate N vectors in a space that maximize distance from each other." You can see that the RGB (or any other scale you use that forms a basis in color space) are just vectors. Take a look at [Random Point Picking][1]. Hope this is a good start for you! Once you have a set of vectors th...
My first thought on this is "how generate N vectors in a space that maximize distance from each other." You can see that the RGB (or any other scale you use that forms a basis in color space) are just vectors. Take a look at [Random Point Picking][1]. Hope this is a good start for you! Once you have a set of vectors th...
My first thought on this is "how generate N vectors in a space that maximize distance from each other." You can see that the RGB (or any other scale you use that forms a basis in color space) are just vectors. Take a look at [Random Point Picking][1]. Hope this is a good start for you! Once you have a set of vectors th...
They were saying they were getting 1.5 million downloads per day back in March 2008, and that was before the Olympics and the Democratic National Convention. So, unless my math is off, that's more than 4 people. I'd expect to see it show up as a recommended Windows update, and possible included with IE8 or something...
They really got a huge bump with the Olympics as far as getting it installed on machines. It will be interesting to see how much developer buy in they can gather. It's a tough sell for front end web people because it's a complete toolset change. I know the midteir/WPF people like it because it's closer to their norm...
Probably not. CTE's are especially good at querying data for tree structures.
No, they aren't (or at least you can't assume they are). Having said that, there are some tricks to do this atomically, but they typically aren't portable (see [Compare-and-swap][1]). [1]: http://en.wikipedia.org/wiki/Compare-and-swap
Most .NET developers I work with have been shying away from Silverlight. Right now it seems more like a novelty than a development platform.
How to implement Repository pattern withe LinqToEntities?
|.net|.net-3.5|linq-to-entities|
How to implement Repository pattern withe LinqToEntities how to implement the interface
Yes, you need to synchronize accesses. In C++0x it will be a data race, and undefined behaviour. With POSIX threads it's already undefined behaviour. In practice, you might get bad values if the data type is larger than the native word size. Also, another thread might never see the value written due to optimizations...
I would make a copy and strip out the comments first, then search the string the regular way.
You don't want to use "overall popularity" unless you have no information about the user. Instead, you want to align this user with similar users and weight accordingly. This is exactly what [Bayesian Inference][1] does. In English, it means adjusting the overall probability you'll like something (the average rati...
Soap logging in .net
Parsing XML Elements & Attributes with Perk
|perl|xml|amazon|
So I wrote some perl that would parse results returned from the Amazon Web Services. I am using the XML::Simple package. For the most part, everything worked when I pulled out an element. However, the problem I ran into was when an element had an attribute as well. Then I get an error that the item is a Hash. ...
Parsing XML Elements & Attributes with Perl
|xml|perl|amazon|
|xml|perl|amazon|amazon-web-services|
An HTTP 200 Response Code does not indicate an error. It indicates that everything was OK. You should not use a 200 response code for an error. Internet Explorer shows its "Friendly Errors" page if the response is less than 512 bytes. Here's more on this issue: [http://weblogs.asp.net/scottgu/archive/2006/04/09...
I'm going to "split the fence" and say use the database for all of your analysis/archiving log entries (such as your Telnet communications). This will grant you the benefits of full text searching, columns, and easy ways to search out the data. Use a flat file (or XML format since the file shouldn't be too big) for ...
If you are using databind in asp.net handle the databinding event and just don't set the NavigateUrl if that users is disabled.
If if the number is negative, you'll have to do this: $x = abs($x) - floor(abs($x));
Have you tried just **not** setting the NavigateUrl property? If this isn't set, it may just render as a span.
most likely just using margins. float the first column left then set the margin to the width of the first column.
You could try signal averaging, i.e. for each point, average the value with the surrounding 3 or more points. If the noise blips are huge, then even this may not help. I realise that this was language agnostic, but guessing that you are using LabView, there are lots of pre-packaged signal processing VIs that come wi...
HTML 4.01. There is absolutely **no reason** to use XHTML for anything but experimental or academic problems that you only want to run on the 'obscure' web browsers. XHTML Transitional is completely pointless even to _those_ browsers, so I'm not sure why anyone would aim for that. It's actually pretty alarming that ...
Let's say I have the following class: public class Test<E> { public boolean sameClassAs(Object o) { // TODO halp! } } How would I check that `o` is the same class as `E`? Test<String> test = new Test<String>(); test.sameClassAs("a string"); // returns true; test.sameCl...
Accessing non-generic members of a generic object
|c#|.net|generics|
Is there a way to collect (e.g. in a List) multiple 'generic' objects that don't share a common super class? If so, how can I access their common properties? For example: class MyObject<T> { public T Value { get; set; } public string Name { get; set; } public MyObject(string nam...
Integration Services: Multiple-step OLE DB operation generated errors
|sql-server|ssis|
I'm attempting to make a DTS package to transfer data between two databases on the same server and I'm getting the following errors. Iv read that the Multiple-step OLE DB operation generated error can occur when you are transferring between different database types and there is loss of precision, but this is not that c...
Safe mode UID check is used to prevent users from accessing other peoples files. GID is used to prevent a GROUP of users from accessing other GROUPS files.
As DannySmurf touches on here, it is all about the structure of the xml document.<br /> If you only two huge "top level" tags, it will be extremely hard to be able to split it in a way that makes it possible to both merge it back together and read it piece by piece as valid xml. <br /> <br /> Given a document with ...
It would read the entire file at once. In my experience, though, if you're just reading the file, doing some processing (ie, breaking it up) and then continuing on with your work, the XmlDocument is going to go through it's create/read/collect cycle so quickly that it likely won't matter. Of course, that depends on ...
Here's another technique for autosizing a textarea. - Uses pixel height instead of line height: more accurate handling of line wrap if a proportional font is used. - Accepts either ID or element as input - Accepts an optional max height param - useful if you'd rather not let the text area grow beyond a certa...
|c#|namespace|.net|candidate-for-title-edit|httpcontext|
|c#|namespace|.net|candidate-for-title-edit|holy-crap-is-that-a-girl|
|c#|namespace|.net|candidate-for-title-edit|
Namespace with Context.Handler and Server.Transfer?
|c#|.net|namespace|
What .NET namespace or class includes both Context.Handler and Server.Transfer? I think one may include both and my hunt on MSDN returned null. Thank you.
|c#|.net|namespaces|
Anyone Using Executable Requirements?
|automation|process|test|executablerequirements|
In my limited experience with them executable requirements (i.e. specifying all requirements as broken automated tests) have proven to be amazingly successful. I've worked on one project in which we placed a heavy emphasis on creating high-level automated tests which exercised all the functionality of a given use case...
|testing|automation|process|executablerequirements|
|testing|automation|process|
|testing|automation|processes|
query all public folders for forms used
|exchange-server|publicfolders|script|reporting|
Does anyone have a script or can anyone point me in the right direction to query an Exchange (2003) public folder tree to determine all forms being used? I need an output of form object/display name and count for each form type in each folder.
|exchange-server|script|reporting|
In Exchange (2003) how do I list the forms used in the public folder tree ?
Does anyone have a script or can anyone point me in the right direction to query an Exchange (2003) public folder tree to determine all the forms being used ? I need an output of form object/display name and count for each form type in each folder.
In the context of a programming forum, we don't usually think of the programmer also needing the application portion of the database. Normally a _programmer_ wants to use their own development environment for the business logic and front end, and just use the datastore capabilities of the database. If you really wa...
In the context of a programming forum, we don't usually think of the programmer also needing the application portion of the database. Normally a _programmer_ wants to use their own development environment for the business logic and front end, and just use the store and retrieval capabilities of the database. If you...
TopMost = true; .Activate() ? Either of those any good? Splitting it out into its own thread is a bit evil as it wont work properly if you don't call it with Application.Run and that will swallow up the thread. In the worst case scenario I guess you could separate it out into a different process and communicate ...
It worked like that: (defun filterBig (x xs) (remove-if (lambda (item) (> item x)) xs)) What was the '#' for? It didn't compile with it.
Check out the AS3Crypto package at http://code.google.com/p/as3crypto/. I haven't tried it, but this package claims to (partially) support the TLS 1.0 protocol. TLS will provide a secure tunnel between your Flash application and the server. http://en.wikipedia.org/wiki/Secure_Sockets_Layer
Check out the AS3Crypto package at http://code.google.com/p/as3crypto/. I haven't tried it, but this package claims to (partially) support the TLS 1.0 protocol. TLS will provide a secure tunnel between your Flash application and the server. http://en.wikipedia.org/wiki/Secure_Sockets_Layer @jcnnghm You norm...
If you start with the idea that you need something *like* a packet sniffer, you'll want to look at [http://netresearch.ics.uci.edu/kfujii/jpcap/doc/][1]. [1]: http://netresearch.ics.uci.edu/kfujii/jpcap/doc/
htmlentities vs htmlspecialchars
|php|
Use [DeviceIoControl](http://msdn.microsoft.com/en-us/library/aa363216%28VS.85%29.aspx) with control code [IOCTL_DISK_GET_DRIVE_GEOMETRY](http://msdn.microsoft.com/en-us/library/aa365169%28VS.85%29.aspx) or [IOCTL_DISK_GET_DRIVE_GEOMETRY_EX](http://msdn.microsoft.com/en-us/library/aa365171%28VS.85%29.aspx). There's ...
Message passing in a plug-in framework problem
|c#|plugins|message-passing|
First off, there's a bit of background to this issue available on my blog: * <http://www.alastairsmith.me.uk/coding/2008/06/25/message-passing-a-plug-framework.html> * <http://www.alastairsmith.me.uk/coding/2008/07/31/message-passing-2.html> I'm aware that the descriptions aren't hugely clear, so I'll try to...
|c#|web-services|soap|
I have an internal enterprise app that currently consumes 10 different web services. They're consumed via old style "Web References" instead of using WCF. The problem I'm having is trying to work with the other teams in the company who are authoring the services I'm consuming. I found I needed to capture the exact S...
AJAX XMLHttpRequest object limt
|ajax|
Is there a security limit to the number of AJAX XMLHttpRequest objects you can create on a single page? If so, does this vary from one browser to another?
I think that it will grow, but MSFT will need to do more deals like they did with the Olympics. Hooking up with CBS/NCAA on the March Madness broadcasts would be worth whatever millions they could throw at it.
The ASP.NET Sitemap feature is built for that and works well in a lot of cases. If you get in a spot where you want your [Menu to look different from your Sitemap, here are some workarounds][1]. [1]: http://weblogs.asp.net/jgalloway/archive/2008/01/26/asp-net-menu-and-sitemap-security-trimming-plus-a-trick-for-w...