instruction
stringlengths
0
30k
Which is the most useful Mercurial hook for programming in a loosely connected team?
|python|mercurial|hook|
I recently discovered the notify extension in Mercurial which allows me quickly send out emails whenever I push changes, but I'm pretty sure I'm still missing out on a lot of functionality which could make my live a lot easier. Which Mercurial hook or combination of interoperating hooks is the most useful for worki...
I recently discovered the notify extension in Mercurial which allows me quickly send out emails whenever I push changes, but I'm pretty sure I'm still missing out on a lot of functionality which could make my live a lot easier. - notify-extension: <http://www.selenic.com/mercurial/wiki/index.cgi/NotifyExtension> ...
With the sharepoint sdk, you can create your own webparts. If you add them to the GAC you can include them on your sharepoint site. You'd of course have to build a webpart for emailing though.
What makes Drupal better/different from Joomla
|drupal|joomla|
I talked to a few friends that say Drupal is amazing and that it is way better than Joomla. What are the major differences/advantages.
I got this to work on a test app just fine... Service Definition: [ServiceContract] public interface IService1 { [OperationContract] CompositeType GetData(int value); } public class CompositeType { bool boolValue = true; str...
**When writing websites for mobile devices**. They don't always support the 'latest and greatest' standards, are depreciated but not deleted from all modern browsers, and simply take up less space and bandwidth (though in theory the streams are compressed by either the websites or the wireless browser, it can't be cou...
> Your `CHAR` and `VARCHAR` columns will use up to 3 times more disk space. Only if they're stuffed full of latin-1 with ordinals > 128. Otherwise, the increased space use of UTF-8 is minimal.
C++ supports covariant return types. MSN
String.format("%4d", i*j );
String.format("%4d", i*j ); See [format][1]. [1]: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#format%28java.lang.String%2C%20java.lang.Object...%29
Employee Web Usage From Proxy Logs
|reporting|
I need to find/create an application that will create employee web usage reports from HTTP proxy logs. Does anyone know of a good product that will do this?
I need to find/create an application that will create employee web usage reports from HTTP proxy logs. Does anyone know of a good product that will do this? *@Joe Liversedge - Good point. I don't have to worry about this, however, as I am the only person in my company with the know-how to pull off an SSH tunnel.*
Some hints: - Your `CHAR` and `VARCHAR` columns will use up to 3 times more disk space. - Use `SET NAMES utf8` before reading or writing to the database. If you don't this then you will get partially garbled characters.
Some hints: - Your `CHAR` and `VARCHAR` columns will use up to 3 times more disk space. (You probably won't get much disk space grow for Swedish words.) - Use `SET NAMES utf8` before reading or writing to the database. If you don't this then you will get partially garbled characters.
"getting" path in linux
|c|linux|operating-system|
I am writing a c program in linux. Commands like execv() require a path in the form of a c string. Is there a command that will return the current path in the form of a c style string?
Static classes are instantiated at runtime. This could be time consuming. Singletons can be instantiated only when needed.
[Alex James, Program Manager on the ADO.Net team][1] at microsoft also has the odd good post on EF especially around Metadata. [1]: http://blogs.msdn.com/alexj/
What code would I use to convert a SQL like expression to a regex on the fly?
|sql|regex|t-sql|like|
I'm looking to convert a SQL like statement on the fly to the equivalent regex i.e. LIKE '%this%' LIKE 'Sm_th' LIKE '[C-P]arsen' What's the best approach to doing this?
|c#|sql|regex|t-sql|like|
I'm looking to convert a SQL like statement on the fly to the equivalent regex i.e. LIKE '%this%' LIKE 'Sm_th' LIKE '[C-P]arsen' What's the best approach to doing this? P.S. I'm looking to do this on the .Net Framework (C#).
You may not locate gacutil.exe in your windows folder while using vista. It's not included because of vista's "Logo Program blah blah" thing. Try to use windows installer to add your assemblies into gac. This is the recommended way. And never forget this traditional ogrish proverb: "Bi siktir git cay koy".
Enabling Hibernate second-level cache with JPA on JBoss 4.2
|java|hibernate|caching|jpa|
What are the steps required to enable Hibernate's second-level cache, when using the Java Persistence API (annotated entities)? How do I check that it's working? I'm using JBoss 4.2.2.GA. From the Hibernate documentation, it seems that I need to enable the cache and specify a cache provider in *persistence.xml*, lik...
How to check if the given string is palindrome?
|language-agnostic|
**Definition:** *A palindrome is a word, phrase, number or other sequence of units that has the property of reading the same in either direction* How to check if the given string is a palindrome? This was one of the FAIQ [Frequently Asked Interview Question] a while ago but that mostly using C. Looking for ...
|language-agnostic|homework|
|language-agnostic|
One issue with the ToolHelp/ManagementObject approaches is that the parent process could already have exited. The GetStartupInfo Win32 function (use PInvoke if there's no .NET equivalent) fills in a structure that includes the window title. For a Win32 console application "app.exe", this title string is "app" when ...
**Step 1** Stop database: shell> /etc/init.d/mysql stop **Step 2** Restart database * without password autentification * without connection to the network Access to database is only possible through it's sock file '/var/lib/mysql/mysql.sock'. shell> mysqld --user=mysql --pid-file=/var/lib/...
Not really. You need to treat it like an e-mail attachment, where the file is generally copied to a temp folder that is cleaned out periodically.
With VBScript (WSH) you could check it with the .state property. This script shows that property being used in a different application but should help illustrate the idea: http://www.robvanderwoude.com/vbstech_proc_service.html
I'm going to say that the answer to your question (is it possible?) is no. I don't know that definitively, but the poster who commented just above halL ([in the comments on this page][1]) gave a work-around for the problem -- so I assume it is possible to deal with when parsing manually. You say that you're using CF...
Yes, use the classes in [System.IO.IsolatedStorage](http://msdn.microsoft.com/en-us/library/system.io.isolatedstorage.aspx)
I used a combination of the answers writing a little function that is called from the AutoKeys macro like so: Public Function RunMyQuery() As Boolean SendKeys "%Q" & "R" RunMyQuery = True End Function Thanks!
How do I script a password change for a SQL server login?
|sql|sql-server|sql-server-2005|
Just what the title says, I need to change the password for an existing sql server login and I want to do it via sql script.
I would write this in C++, C#, or Java -- environments where I know for certain that you can get the Unicode characters out of a path properly. It's always uncertain with command-line tools, especially out of Cygwin. Then the code is a simple find/replace or regex/replace. If you can name a language it would be ea...
ALTER LOGIN <http://msdn.microsoft.com/en-us/library/ms189828.aspx>
A debugger called `fdb` is included in the Flex SDK. Here's some documentation on how to use it: - [Adobe DevCenter: Debugging Client-Side Code in Flex Applications][1] - [Flex 3 Help: Using the Command-Line Debugger][2] [1]: http://www.adobe.com/devnet/flex/articles/client_debug_08.html [2]: http://liv...
@Rushi I don't like strtotime() personally.. i don't know why but i discovered this morning that passing a string like this '2008-09-11 9:5 AM' to strtotime returns a false... I don't think the code you provided solve the example problem 'Given two dates, how many workdays are there between the two dates? Implement ...
This sounds to me like a an NP complete problem. I'm not sure there is a sure fire way to prove this kind of thing
Answering my own question: I ended up using the Microsoft.VisualBasic.FileIO.TextFieldParser object, see: http://msdn.microsoft.com/en-us/library/f68t4563.aspx and example of implementation at: http://www.siccolo.com/Articles/CodeProject/Open_DataSet_From_TextFile/open_dataset_from_text_csv_file.html Thi...
The &lt;b> and &lt;i> tags don't have semantic meaning, whereas &lt;strong> and &lt;em> do. If a reader read the block of text aloud it would react to the &lt;strong> and &lt;em> tags, whereas the &lt;i> and &lt;b> tags would be ignored, and treated and purely visual elements. I tend to regard &lt;i> and &lt;b> as depr...
If a process dies all it's threads die with it, so a solution might be a separate process. See if creating a xmlrpc server might help you, that is a simple solution for interprocess communication.
In my opinion you should never clone the element unless you explicitly state that your data structure does that. The desired functionality of most things needs the actual object to be passed into the data structure by-reference. If you want to make the <code>Node</code> class safer, make it an inner class of the ...
Programatically show tooltip in winforms application.
|winforms|
How can I programatically cause a control's tooltip to show in a Winforms app? (P/Invoke is ok if necessary).
How can I programatically cause a control's tooltip to show in a Winforms app without needing the mouse to hover over the control? (P/Invoke is ok if necessary).
If you really want to go that way, to modify what the code does using an attribute, there are some ways to do it and they all are related to AOP (Aspect oriented programming). Check out [PostSharp][1], which is an aftercompiler that can modify your code in a after compilation step. For example you could set up one cust...
It depends. - Local System - Never, it's too high a privilege. - Network Service - Perhaps, if you need to connect to network resources, but that's doubtful. - Local Service - Probably the best choice, limited privileges, do not unlock network connections - Local interactiv...
Does Java impose any further restrictions on filenames other than the underlying operating system?
|java|filesystems|operating-system|
Does Java impose any extra restrictions of its own. Windows (upto Vista) does not allow names to include \ / < > ? * : I know HOW to validate names (a regular expression). I need to validate filenames entered by users. My application does not need to run on any other platform, though, of course, I would pref...
// Boost DFS example on an undirected graph. // Create a sample graph, traverse its nodes // in DFS order and print out their values. #include <boost/graph/adjacency_list.hpp> #include <boost/graph/depth_first_search.hpp> #include <iostream> using namespace std; typedef b...
The perl built-in is select(), which is a pass-through to the select() system call, but for sane people I recommend IO::Select From IO::Select POD: The "IO::Select" package implements an object approach to the system "select" function call. It allows the user to see what IO handles, see the IO::Handle manpage, ...
The perl built-in is select(), which is a pass-through to the select() system call, but for sane people I recommend IO::Select Code sample: #!/usr/bin/perl use IO::Select; $s = IO::Select->new(); $s->add(\*STDIN); while (++$i) { print "Hiya $i!\n"; sleep(5);...
This doesn't really answer your question but I was listening to a podcast on [Pex from microsoft][1] which does a similar thing to the solution you're proposing and when I was listening to it I remember thinking that it would be really interesting to see if it would be able to test games. I don't know if it would be ab...
Gets things done is really all you need to evaluate a developer. After that you look at the quality that the developer generates. Do they write unit tests and believe in testing and being responsible for the code they generate? Do they take initiative to fix bugs without being assigned them? Are they passionate abo...
According to a [response][1] on the next related blog post, they are a purely static mechanism in the F compiler. So there is no CLR representation of the units data. Its not entirely clear whether it currently works with non-float types, but from the perspective of the type system it is theoretically possible. ...
According to a [response][1] on the next related blog post, they are a purely static mechanism in the F# compiler. So there is no CLR representation of the units data. Its not entirely clear whether it currently works with non-float types, but from the perspective of the type system it is theoretically possible. ...
How do I set windows to perform auto login?
|windows|
Windows has a feature that allows an administrator to perform auto-logon whenever it is started. How can this feature be activated? There are tools out there that give you a GUI for setting this easily, but you can also do it relatively easily by editing the registry. Under the following registry key: HKEY_LOCAL...
Windows has a feature that allows an administrator to perform auto-logon whenever it is started. How can this feature be activated?
3des is pretty good, store the salt along side, and keep a standard key somewhere not in the database or a config file. That way if you get pwned, they can't decrypt it.
I downloaded your code and everything work as expected. Visual Studio debugger correctly intercepts all exceptions. Catch blocks work as expected. I'm running Windows 2003 server SP2, VS2008 Team Suite (9.0.30729.1 SP) I tried to compile you project for .NET 2.0, 3.0 & 3.5
I downloaded your code and everything work as expected. Visual Studio debugger correctly intercepts all exceptions. Catch blocks work as expected. I'm running Windows 2003 server SP2, VS2008 Team Suite (9.0.30729.1 SP) I tried to compile you project for .NET 2.0, 3.0 & 3.5 @Steve Steiner, debugger opt...
[getcwd()](http://www.opengroup.org/onlinepubs/009695399/functions/getcwd.html)
This is *not* ANSI C: #include <unistd.h> char path[MAXPATHLEN]; getcwd(path, MAXPATHLEN); printf("pwd -> %s\n", path);
I found a Perl module called [Regexp::Wildcards][1]. You can try to port it or try Perl.NET. I have a feeling you can write something up yourself too. [1]: http://search.cpan.org/dist/Regexp-Wildcards/lib/Regexp/Wildcards.pm
I'd seen this error many times. It could be caused by many things including network errors too :). But one of the reason could be built-in feature of MS-SQL. The feature detects DoS attacks -- in this case too many request from web server :). But I have no idea how we fixed it (only sys admins know). But I...
The **path** argument to execv() is the path to the application you wish to execute, not the current working directory (which will be returned by getcwd()) or the shell search path (which will be returned by getenv("PATH")). Depending on what you're doing, you may get more mileage out of the system() function in the...
To ensure your WCF application can scale to the desired level I think you might need to tweak your thinking about the stats your services have to meet. You mention servicing "1000+ client users" but to gauge if your services can perform at that level you'll also need to have some estimated usage figures, which will ...
I am not a professional programmer so this isn't an exact answer. What you need to do is grab the environment variable PWD (present working directory) I'm not sure what the library it is in but it is a standard linux header. I'll look around and see if I can find it.
I am not a professional programmer so this isn't an exact answer. What you need to do is grab the environment variable PWD (present working directory) I'm not sure what the library it is in but it is a standard linux header. I'll look around and see if I can find it. edit: I was thinking of ,<a href="htt...
I am not aware of any API to do get the OS's scheduler to do what you want (even if your thread is idle-priority, if there are no higher-priority ready threads, yours will run). However, I think you can improvise a fairly elegant throttling function based on what you are already doing. Essentially (I don't have a Wind...
> I've found that both SVN tools have at times failed to keep up with my file/folder renaming and moving resulting in it thinking that a perfectly good file needs to be deleted on the next commit. A move or rename operation results in an delete and 'add with history' at subversion level. TortoiseSvn shows this a...
@mcintyre321 > I've found that both SVN tools have at times failed to keep up with my file/folder renaming and moving resulting in it thinking that a perfectly good file needs to be deleted on the next commit. A move or rename operation results in an delete and 'add with history' at subversion level. TortoiseSv...
Whenever you want to do things incorrectly ... just kidding. The real answer is never, these tags have been deprecated by the [W3C][1] [1]: http://www.w3c.com/
Neither &lt;b> nor &lt;i> are semantic tags, so purists would say they should not be used. Where I've seen their use justified are in things like putting online content in print where text was bolded or italicized as a matter of convention, but not as a manner of strengthening or emphasizing content. The easy examp...
You should be able to do that java.lang.Runtime.exec and shell commands.
The [API][1]. Every form and pretty much every bit of functionality can be modified via a module that hooks into the API, without having touch core code. This makes upgrades **much** easier, as your customisations aren't overwritten. The code it outputs by default is much nicer, as well. [1]: http://api.drup...
Returning a tuple is cool. Also note the new namedtuple which was added in python 2.6 which may make this more palatable for you: http://docs.python.org/dev/library/collections.html#collections.namedtuple
For markup generated by a WYSIWYG editor.
It sounds like you are having a problem with the browser itself. Does this problem only occur in one browser? One thing you might try is using a lightweight library like [jQuery][1]. It handles browser differences fairly nicely. To set the inner HTML for a div with the ID of **container** you would simply write t...
Enabling OpenGL in wxWidgets