instruction stringlengths 0 30k ⌀ |
|---|
EU::MM still seems to be the most widely supported and popular one, but Module::Build is catching up. Also, check out [Module::Starter][1] for a module that will help you get started.
[1]: http://search.cpan.org/dist/Module-Starter/ |
How do I get my Disciplines to appear in published Site (in EPF Composer 1.5)? |
|methodology|eclipse-plugin| |
I have a custom category ("disciplines") in my method plugin which I want to use to contain existing disciplines (from the Scrum plugin and EPF OpenUP library) as well as a few of my own (some are new, and others extend the OpenUP ones). I can add them simply, order them as desired, and view them in the Browsing Perspe... |
Sometimes, looking outside the beaten path you can find a real gem. You might want to consider [PureBasic][1] (Don't let the name mislead you). Here's some details:
PureBasic Features
- Machine Code (Assembly) executables (FASM)
- In-line Assembly support
- No run-times needed (no DLLs needed,et... |
First off, sorry I'm late to the party. This is my first stackoverflow answer. :)
As has been pointed out, when realloc() is called, you can potentially change the pointer to the memory being reallocated. When this happens, the argument "string" becomes invalid. Even if you reassign it, the change goes out of scope ... |
How to access .Net element on Master page from a Content page? |
|c#|.net|visual-studio| |
Is it possible to access an element on a Master page from the page loaded within the ContentPlaceHolder for the master?
I have a ListView that lists people's names in a navigation area on the Master page. I would like to update the ListView after a person has been added to the table that the ListView is data bound t... |
Alternatively to wget you could use (Win|Web)HTTrack ([Website][1]) to grab the static page. HTTrack even corrects links to files and documents to match the static output.
[1]: http://www.httrack.com/ |
Not sure if you're talking about Coverflow (scroll through images) or Quicklook (preview files in lightbox), try editing your question.
Here's some JS Coverflow implementations:
- [MooFlow - Coverflow for MooTools][3]
- [Coverflow in JS proof of concept][1]
- [Coverflow using JS and CSS Transforms (Webkit... |
CxxUnit has a perl/python script to build the test runner.
As mentioned previously it is a C/C++ unit test framework. So you will need a C++ compiler.
After a small slope to get it setup (smaller still since you don't have to write the test runner), it's pretty easy to use (includes samples and useful docume... |
I use CxxTest for an embedded c/c++ environment (primarily C++).
I prefer CxxTest because it has a perl/python script to build the test runner. After a small slope to get it setup (smaller still since you don't have to write the test runner), it's pretty easy to use (includes samples and useful documentation). T... |
You can also define signals inside the class definition:
class MyGObjectClass(gobject.GObject):
__gsignals__ = {
"some-signal": (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, (object, )),
}
The contents of the tuple are the the same as the three last arguments to `gobject.signal_ne... |
If you do build the integration code using .NET, you may want to consider leveraging the WCF Line-of-Business SDK:
[http://www.microsoft.com/biztalk/technologies/wcflobadaptersdk.mspx][1]
It's not a BizTalk-only technology, despite its categorization. The SDK is designed to make it easier to create a WCF channel... |
The fetch that you are doing should get all the remote branches, but it won't create local branches for them. If you use gitk, you should see the remote branches described as "remotes/origin/dev" or something similar.
To create a local branch based on a remote branch, do something like:
<pre>git checkout -b dev ref... |
When I was managing a large multi-user planning system backed by Oracle, our DBA had a weekly job that gathered statistics. Also, when we rolled out a significant change that could affect or be affected by statistics, we would force the job to run out of cycle to get things caught up. |
For some reason VS2005 seems to have this a bit backwards when it comes to webservices. To open a webservice in code view, double-click the .asmx file, not the .asmx.cs file.
I guess it makes a bit of sense, as there's nothing to "design" when it comes to a webservice, but it's counterintuitive if you've been worki... |
2008's [full text search capabilities][1] have been improved - perhaps look there first..
[1]: http://technet.microsoft.com/en-us/library/cc721269.aspx |
Yes there is an API. Windows Vista Complete PC Backup creates a .vhd (virtual hard disk) image that can be accessed via the [Virtual Server 2005 API][1] or from a command line utility available in Virtual Server 2005 which is freely available [here][2].
[1]: http://technet.microsoft.com/en-us/library/cc756145.a... |
Seems like Facebook has an api for this. Check this blog here.
http://developers.facebook.com/news.php?blog=1&story=73 |
I believe MS SQL 2005+ has the capability to search using regular expression.
MSDN has an article about this http://msdn.microsoft.com/en-us/magazine/cc163473.aspx. |
Spend some time focusing on the copious documentation offered by NVIDIA.
From the Programming Guide:
float* devPtr;
cudaMalloc((void**)&devPtr, 256 * sizeof(*devPtr));
cudaMemset(devPtr, 0, 256 * sizeof(*devPtr));
That's a simple example of how to allocate memory. Now, in your kernels, you shoul... |
Spend some time focusing on the copious documentation offered by NVIDIA.
From the Programming Guide:
float* devPtr;
cudaMalloc((void**)&devPtr, 256 * sizeof(*devPtr));
cudaMemset(devPtr, 0, 256 * sizeof(*devPtr));
That's a simple example of how to allocate memory. Now, in your kernels, you shoul... |
The SAX handler interfaces were designed to be easy to implement. It's easy to write a class with similar (perhaps wrapping a SAX interface) to make it easy to call - chaining, remembering which element to close, easier attributes, etc. |
What's the best option for searching in Ruby on Rails? |
|ruby-on-rails|search|ruby| |
There are several plugin options for building a search engine into your Ruby on Rails application. Which of these is the best?
- [Thinking Sphinx][1]
- [UltraSphinx][2]
- [Sphincter][3]
- [acts_as_sphinx][4]
- [acts_as_ferret][5]
- [Ferret][6]
[1]: http://ts.freelancing-gods.com/
[2]: htt... |
There are several plugin options for building a search engine into your Ruby on Rails application. Which of these is the best?
- [Thinking Sphinx][1]
- [UltraSphinx][2]
- [Sphincter][3]
- [acts\_as\_sphinx][4]
- [acts\_as\_ferret][5]
- [Ferret][6]
- [acts\_as\_xapian][7]
[1]: http://ts.fr... |
|ruby|ruby-on-rails|search| |
There are several plugin options for building a search engine into your Ruby on Rails application. Which of these is the best?
- [Thinking Sphinx][1]
- [UltraSphinx][2]
- [Sphincter][3]
- [acts\_as\_sphinx][4]
- [acts\_as\_ferret][5]
- [Ferret][6]
- [acts\_as\_xapian][7]
- [acts\_as\_solr][8]... |
Try assuring that you send the correct message and the messages received by the server are also correct, e.g. using assertions (it is called Design by Contract).
If you have such possibility, try debugging the server side and client side at the same time. (running two VS instances at the same time) |
If you control the protocol (that is, both the client and server) I would highly recommend using Javascript/JSON for your server-to-client messages. The client can open a stream either via dynamically adding a <script> tag to the DOM. The server can then send a stream of Javascript commands like:
receive... |
I recommend you take a look at Martin Fowler's article [*Mocks Aren't Stubs*][1] for a more authoritative treatment of Mocks than I can give you.
The purpose of mocks is to unit test your code in isolation of dependencies so you can truly test a piece of code at the "unit" level. The code under test is the real dea... |
I recommend you take a look at Martin Fowler's article [*Mocks Aren't Stubs*][1] for a more authoritative treatment of Mocks than I can give you.
The purpose of mocks is to unit test your code in isolation of dependencies so you can truly test a piece of code at the "unit" level. The code under test is the real dea... |
How to vertically center content with variable height within a div? |
|css| |
What is the best way to vertically center the content of a div when the height of the content is variable. In my particular case, the height of the container div is fixed, but it would be great if there were a solution that would work in cases where the container has a variable height as well. Also, I would love a sol... |
User Initiated Kernel dump in Windows XP |
|windows-xp|kernel|memory-dump| |
I remember watching a webcast from Mark Russinovich showing the sequence of keyboard keys for a user initiated kernel dump. Can somebody refresh my memory on the exact order of the keys.
Please note this is for XP. |
Similar to what @Rob @wcm and @David explained...
public class Temperature
{
private double celcius;
public static Temperature FromFarenheit(double farenheit)
{
return new Temperature { Farhenheit = farenheit };
}
public static Temperature Fr... |
I think it's cheating I've never played before ;) but here goes
8086 assembler:
org Int3VectorAdrress ;is that cheating?
int 3
1 byte - or 5 characters that generate code, what say you?
|
if you are using malloc, it does not intialize the memory to anything. you get whatever. if you want to allocate a block and initialize it to 0, use 'calloc' which is like malloc only with initialization (an an element size parameter which you set to 1 if you want to emulate malloc). you should read up on calloc before... |
I recently built a version of the UDR as well but used Vista x64. It works great with the VMs. Just get lots of memory (8gbs) and fast hard drives. I've heard good things about Win Server 2008 but not sure if driver support is available. On a older dell laptop that I tried installing WinServer 2008 and it kept crashing... |
I use the following for the SQL Select:
public string BuildSQL()
{
// Format: CAST('2000-05-08 12:35:29' AS datetime)
StringBuilder sb = new StringBuilder("CAST('");
sb.Append(_dateTime.ToString("yyyy-MM-dd HH:mm:ss"));
sb.Append("' AS datetime)"... |
I have been using ext which is another javascript framework with .net. It is far easier to use than old fashioned HTML form controls
<input type="text" id="whatever" />
Than using ASP.net form controls. You probably want to use the cool javascript framework form validation as opposed to the not so great built... |
An alternative to qrr in this case is recording a macro and replaying it. (isearch-forward-regexp, select the character, downcase-region.) I find on the fly macros easier, since you get immediate feedback if your regexp is wrong. |
When you subtract the human element (tagging), all that is left is frequency. "Ignore common English words" is the next best filter, since it deals with exclusion instead of inclusion. I tested a few sites, and it is very accurate. There really is no other way to derive "meaning", which is why the Semantic Web gets so ... |
Perl Sys::Syslog on Solaris |
|perl|solaris|syslog| |
Has anyone got [Sys::Syslog][1] to work on Solaris? (I'm running Sys::Syslog 0.05 on Perl v5.8.4 on SunOS 5.10 on SPARC). Here's what doesn't work for me:
openlog "myprog", "pid", "user" or die;
syslog "crit", "%s", "Test from $0" or die;
closelog() or warn "Can't close: $!";
system "tail /var/a... |
Your custom disciplines and extensions must contain tasks. When you add some, they will be visible upon publishing. |
Also remember to stop and remove any related Timers when disposing of the removed objects: [BIT-101: Running timers are not garbage collected. Ever.][1]
[1]: http://www.bit-101.com/blog/?p=1169 |
StringBuilder is probably preferable. The reason is that it allocates more space than currently needed (you set the number of characters) to leave room for future appends. Then those future appends that fit in the current buffer don't require any memory allocation or garbage collection, which can be expensive. In ge... |
If you're doing a lot of string concatenation, use a StringBuilder. When you concatenate with a String, you create a new String each time, using up more memory.
Alex |
Parsing HTML-like Documents with PHP |
|php|html|parsing| |
I have a bunch of legacy documents that are HTML-like. As in, they look like HTML, but have additional made up tags that aren't a part of HTML
<strong>This is an example of a <pseud-template>fake tag</pseud-template></strong>
I need to parse these files. PHP is the only only tool available. The documents... |
I have a bunch of legacy documents that are HTML-like. As in, they look like HTML, but have additional made up tags that aren't a part of HTML
<strong>This is an example of a <pseud-template>fake tag</pseud-template></strong>
I need to parse these files. PHP is the only only tool available. The documents... |
Find style references that don't exist |
|css| |
Is there a tool that will find for me all the css classes that I am referencing in my HTML that don't actually exist?
ie. if I have <ul class="topnav" /> in my HTML and the topnav class doesn't exist in any of the referenced CSS files. |
Is there a tool that will find for me all the css classes that I am referencing in my HTML that don't actually exist?
ie. if I have <ul class="topnav" /> in my HTML and the topnav class doesn't exist in any of the referenced CSS files.
[closed - duplicate of [SO# 33242][1]
[1]: http://stackoverflow.c... |
Is there a tool that will find for me all the css classes that I am referencing in my HTML that don't actually exist?
ie. if I have <ul class="topnav" /> in my HTML and the topnav class doesn't exist in any of the referenced CSS files.
[closed - duplicate of [SO# 33242][1]
[1]: http://stackoverflow.c... |
Is there a tool that will find for me all the css classes that I am referencing in my HTML that don't actually exist?
ie. if I have <ul class="topnav" /> in my HTML and the topnav class doesn't exist in any of the referenced CSS files.
This is similar to [SO#33242][1], which asks how to find unused CSS styl... |
Sun did an evaluation of <A HREF="http://opensolaris.org/os/community/tools/scm/git-eval.txt">git</A>, <A HREF="http://opensolaris.org/os/community/tools/scm/mercurial-eval.html">Mercurial</A>, and <A HREF="http://opensolaris.org/os/community/tools/scm/bzr-eval/">Bazaar</A> as candidates to replace the Sun Teamware VCS... |
To be honest the only real improvement i've seen from SP1 and this is because I haven't been looking for specific improvements is that it will now read your TODO and HACK tasks from all files in a project instead of just the file open. That particular feature is useful though. |
You could first check to see if the object responds to the "collect" method by using "pofiles.respond_to?".
From [Programming Ruby][1]
> obj.respond_to?(
> aSymbol, includePriv=false ) -> true
> or false
>
> Returns true if obj responds to the
> given method. Private methods are
> included in the sea... |
While it's possible to create lots of test data and see what happens, it's more efficient to try to minimize the data being used.
From a typical QA perspective, you would want to identify different classifications of inputs. Produce a set of input values for each classification and determine the appropriate outputs.... |
Inform potential clients about security vulnerabilities? |
|sql|xss|injection| |
We have a lot of open discussions with potential clients, and they ask frequently about our level of technical expertise, including the scope of work for our current projects. The first thing I do in order to gauge the level of expertise on staff they have now or have previously used is to check for security vulnerabil... |
I second the use of TortoiseSVN, simply right-click on the directory and go to TortoiseSVN->Branch/tag... to quickly create a branch at a specified directory. Be sure to fill out the URL to be what you want it to be on the resulting "Copy (Branch / Tag) dialog window.
[1]: http://beta.stackoverflow.com/users/18... |
I second the use of TortoiseSVN, simply right-click on the directory and go to TortoiseSVN->Branch/tag... to quickly create a branch at a specified directory. Be sure to fill out the URL to be what you want it to be on the resulting "Copy (Branch / Tag)" dialog window.
[1]: http://beta.stackoverflow.com/users/1... |
Either `file` on the *nix command-line or reading the initial bytes of the file. Most files come with a unique header in the first few bytes. For example, TIFF's header looks something like this: <pre>0x00000000: 4949 2a00 0800 0000</pre>
For more information on the TIFF file format specifically if you'd like to know ... |
This tools allows you to import to and from SQL Server.
- [http://www.download3000.com/download_17933.html][1]
[1]: http://www.download3000.com/download_17933.html |
You probably want a where clause to get just last 30 days comments:
SELECT entry-id, count(id) AS c
FROM comment
WHERE comment_date + 30 >= sysdate
GROUP BY entry-id
ORDER BY c DESC |
AFAIK you can do this as long as the branches were created off of the same original folder.
- trunk/
- branches/
-/feature1 (branched from trunk)
-/feature2 (branched from trunk)
If you do this then you should be able to merge between feature1 and feature2 as well.
Though my branching/merging experi... |
I think the problem with this would be, that it would be quite hard to do checks on XSS without messing up their site. Also, things like SQL injection could be quite dangerous. If you stuck with appending selects, you might not have too much of a problem, but then the question is, how do you know it's even executing t... |
Not hardcore technology but I really enjoy [Drunk and Retired][1]. It's like you're talking to your programmer buddy mixed in with life stuff.
[1]: http://www.drunkandretired.com/podcast/ |
Similar to what @Rob @wcm and @David explained...
public class Temperature
{
private double celcius;
public static Temperature FromFarenheit(double farenheit)
{
return new Temperature { Farhenheit = farenheit };
}
public static Temperature Fr... |
Unless you are a payment processor you don't really need to store any kind of CC information.
Review your requirements, there really is not many cases where you need to store CC information |
I got it figure out. It goes something like this:
<form method="post" action="<%= Html.AttributeEncode(Url.Action("CastUpVote")) %>">
<input type="submit" value="<%=ViewData.Model.UpVotes%> up votes" />
</form>
Thanks everyone for their help! |
I recently spent a few days working on automating deployments at my company.
We use a combination of CruiseControl, NAAnt, MSBuild to generate a release version of the app. Then a separate script uses MSDeploy and XCopy to backup the live site and transfer the new files over.
Our solution is briefly described i... |
I recently spent a few days working on automating deployments at my company.
We use a combination of CruiseControl, NAnt, MSBuild to generate a release version of the app. Then a separate script uses MSDeploy and XCopy to backup the live site and transfer the new files over.
Our solution is briefly described in... |
Don't go down the dark path Master Luke. :) Don't mock everything. You could but you shouldn't... here's why.
- If you continue to test each method in isolation, you have surprises and work cut out for you when you bring them all together ala the **BIG BANG**. We build objects so that they can work together to solv... |
I've got a project converting WAV files (actually Asterisk voice mails) into MP3's. If I remember correctly there are some oddities about Lame's license, so I've downloaded and compiled first [LAME][1], then [SOX][2] by hand.
I have a web process written in PHP to actually convert the files from WAV to MP3 on the w... |
t is unclear how you got the zipStream. It should work when you get it like this:
zipStream = zipFile.getInputStream(zipEntry)
If you are obtaining the ZipInputStream from a ZipFile you can get one stream for the 3d party library, let it use it, and you obtain another input stream using the code before.
... |
The following might be helpful if you are attempting to accomplish this with either C++ or python. Also, this would be even more helpful in the case that you want your programmatic method to be cross-platform portable. (Windows, Linux, Mac osx, and even beyond)
My response involves a similar approach to one of the ... |
An 'app' could be many different things, it all really comes down to taste. For example, let's say you are building a blog. Your app could be the entire blog, or you could have an 'admin' app, a 'site' app for all of the public views, an 'rss' app, a 'services' app so developers can interface with the blog in their own... |
Are there any Parsing Expression Grammar (PEG) libraries for Javascript or PHP? |
|javascript|php|parsing|generative-programming| |
I find myself drawn to the Parsing Expression Grammar formalism for describing domain specific languages, but so far the implementation code I've found has been written in languages like Java and Haskell that aren't web server friendly in the shared hosting environment that my organization has to live with.
Does any... |
Just make sure you somehow log what is happening while it's working. Otherwise you'll have a black box and if it gets stuck somewhere for hours, you'll be wondering whether to stop it or let it work 'a little bit more'. |
If it's working in release mode, it's because of shear luck.
Mike B is right to assume that the debug fix is hiding a bug. In release mode, a pointer is being used that has been freed but not set to NULL, and the memory it points to is still "valid". At some point in the future, memory allocations will change, o... |
Does your code by any change use any JNI? (i.e. are you running any native code launched from Java?).
We've seen a similar behavior, but JDK 1.6.0_05. App appears to deadlock, but Jstack shows threads waiting for a lock that no other threads are holding onto. We have some JNI code, so it's possible we're corrupting ... |
You may want to check out Eclipse CDT. It provides a C/C++ IDE that runs on multiple platforms (e.g. Windows, Linux, Mac OS X, etc.). Debugging with Eclipse CDT is comparable to using other tools such as Visual Studio.
You can check out the [Eclipse CDT Debug tutorial](http://download.eclipse.org/tools/cdt/docs/tu... |
the [`last`][1] command will give you the reboot times of the system. You could take the difference between each successive reboot and that should give the uptime of the machine.
[1]:http://linux.about.com/library/cmd/blcmdl1_last.htm |
Error Tolerant HTML/XML/SGML parsing in PHP |