instruction stringlengths 0 30k ⌀ |
|---|
<a href="http://www.stack.nl/~dimitri/doxygen/">Doxygen</a> is really excellent for this, although you will need to install <a href="http://www.graphviz.org/">GraphViz</a> to get the the graphs to draw.
Once you've got everything installed, it's really rather simple to draw the graphs. Make sure you set <a href="htt... |
Have a look at [FLTK][1] which supports X11 and Windows.
[1]: http://fltk.org/index.php |
G'day,
As you're talking about integration testing my big (obvious) tip would be to make the test server built and configured as close as possible to the deployment environment as possible.
</thebloodyobvious> (-:
cheers,
Rob |
For all solutions about the back button, none of them are "automatic". With every single one you are going to have to do some work to persist the state of the page. So no, there isn't a way to "trick" the browser, but there are some great libraries out there that help you with the back button. |
If the program has to email you directly, it has to get that information somehow, so a determined attacker could gain that information as well.
Have you considered hosting a simple http form or web service somewhere, so that you could post the information you need there from the application (no authentication requir... |
As long as your account is on gmail.com, set up **gmail-smtp-in.l.google.com** as the outgoing SMTP-server in your program. You do not need to provide a password to send email to gmail-accounts when using that server. |
I would create a webservice to connect to. This webservice should send the email based on the data your program provide. All sensitive access-data is kept on the webservice side, so it's safer.
|
Try running
lsof | grep /mnt/data
That should list any process that is accessing /mnt/data that would prevent it from being unmounted. |
How are you adding the environment variable?
Without using any external tools, you can [add it to the registry][1]. Then, your test of opening a new command window will reflect your change.
[1]: http://www.windowsnetworking.com/kbase/WindowsTips/WindowsNT/AdminTips/Miscellaneous/SetEnvManipulateNTEnvironment... |
To answer your question as stated would require digging into the instruction timings of the particular CPU that this code will be running on which therefore require me to make a bunch of assumptions around the state of the caches in the system and the assembly code emitted by the compiler. It would be an interesting an... |
This is a very interesting question. I (vaguely) remember an assignment very similar in college 17 years ago. We had to create an array of pipes, where our code would get filehandles for the input/output of each pipe. Then the code would fork and close the unused filehandles.
I'm thinking you could do something sim... |
Microsoft hired one fo the kids from A List Apart to whip some out. The .Net projects are free of charge for download.
http://msdn.microsoft.com/en-us/asp.net/aa336613.aspx
peace|dewde
http://dewde.com |
Free ASP.Net and/or CSS Themes |
|free|asp.net-themes|css-themes| |
Where can I get some decent looking free ASP.Net or CSS themes? |
|asp.net|css|free|themes| |
Unless C: is not the drive that windows booted from.<br />Parse the %SystemRoot% variable, it contains the location of the windows folder (i.e. c:\windows). |
VSJ, I find it a great mag :) [http://www.vsj.co.uk/](http://www.vsj.co.uk/)
###Edit
This is NOT off-topic! It directly relates to programming! |
First, this is MUCH easier if both the server and your workstation are on the same domain (the server needs access to connect to your machine). In your C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86 (or x64, or ia64) directory are the files you need to copy to your server. There are differ... |
I'm trying to come up with a design for a thread pool with a lot of design requirements for my job. This is a real problem for working software, and it's a difficult task. I have a working implementation but I'd like to throw this out to SO and see what interesting ideas people can come up with, so that I can compare ... |
The principal framework for audio development in Mac OS X is Core Audio; it's the basis for all audio I/O. There are layers on top of it like Audio Toolbox, Audio Queue Services, QuickTime, and QTKit that you can use if you want a simplified API for common tasks.
To just pull a stream of samples, you'd probably wan... |
|svn|version-control|tfs|teamfoundationserver| |
|svn|version-control|tfs| |
As you are sure about needing to represent the *presentational* side of things, it may be worth looking at the [XSL-FO][1] W3C Recommendation. This is a full-blown page description language and the (deeply unfashionable) other half of the better-known XSLT.
Clearly the whole thing is anything but "lightwight", but i... |
Might be a kludge (and may not even work) but on your Login page see if `Request.QueryString["ReturnUrl"] != null` and if so set `Response.StatusCode = 401`.
Bear in mind that you'll still need to get your console app to authenticate somehow. You don't get HTTP basic auth for free: you have to roll your own, but the... |
How do I change my workstation in Team Foundation Server 2k5 and 2k8? |
|teamfoundationserver|workstations| |
I've got multiple projects in a couple different workstations. However, it seems like I can never figure out how to change my current workstation. The result is that files that I have checked out on my machine are shown to be checked out by somebody else and are not accessible. |
How do I change my workspace in Team Foundation Server 2k5 and 2k8? |
I've got multiple projects in a couple different workspaces. However, it seems like I can never figure out how to change my current workspace. The result is that files that I have checked out on my machine are shown to be checked out by somebody else and are not accessible.
**Edit**: Workspaces. |
|tfs|workstations| |
We just did a large AIR app that used PDF quite a bit - make sure you save yourself some heartache and write some code to check the acrobat version or that it's even installed - if they don't have it you won't get an error, just a blank HTML control.
I know, it sounds obvious, but still... |
It's called [alpha blending](http://en.wikipedia.org/wiki/Alpha_compositing).
In psuedocode, assuming the background color (blend) always has 255 alpha. Also assumes alpha is 0-255.
alpha=argb.alpha()
r = (alpha/255)*argb.r() + (1 - alpha/255)*blend.r()
g = (alpha/255)*argb.g() + (1 - alpha/255)*ble... |
It's called [alpha blending](http://en.wikipedia.org/wiki/Alpha_compositing).
In psuedocode, assuming the background color (blend) always has 255 alpha. Also assumes alpha is 0-255.
alpha=argb.alpha()
r = (alpha/255)*argb.r() + (1 - alpha/255)*blend.r()
g = (alpha/255)*argb.g() + (1 - alpha/255)*ble... |
I bounce about between Mac, Windows and Ubuntu and while Emacs used to be my editor of choice, I'm finding that in my old age I prefer to something GUI-based (using command-line for the shell is still fine by me). My preferred editor is [Komodo Edit][1], which the advantages of:
* Being free (as in beer)
* Availabl... |
Choosing a static code analysis tool |
|c|testing|unix| |
I'm working on a project where I'm coding in C in a UNIX environment. I've been using the lint tool to check my source code. Lint has been around a long time (since 1979), can anyone suggest a more recent code analysis tool I could use ? Preferably a tool that is free. |
I find [Ghost Doc][1] to be very useful.
> GhostDoc is a free add-in for Visual Studio that automatically generates XML
documentation comments for C#. Either by using existing documentation inherited
from base classes or implemented interfaces, or by deducing comments from
name and type of e.g. methods, properti... |
And here's what works...
curl -s --cookie soba=. http://stackoverflow.com/users |
@Chris I have found that Visual Studio is the best IDE for developing against .NET -- I think the best way to target Mono is really just to develop and build in Visual Studio under Windows then just run those binaries directly on Linux (or whatever other Mono platform you are using). There are free versions of Visual ... |
Best practices for building Flash video player |
|flash|video| |
We have a custom-built Flash-based video player that I maintain, and it needs to support preroll ads and ideally both progressive video playback and streaming depending on a server switch.
I've been working with the flvPlayback component but am finding myself a little out of my depth. Are there any good tutorials or... |
[GeoTools][1] has code to transform to and from about any coordinate system you could imagine, and among them also Google Map's. It's also open source. However, it should also be pointed out that GeoTools is a <strong>large</strong> library, so if you're looking something small, quick and easy, it's likely not the way ... |
Test serialization encoding |
|java|xml|string|serialization|encoding| |
What is the best way to verify/test that a text string is serialized to a byte array with a certain encoding?
In my case, I want to verify that an XML structure is serialized to a byte array with the UTF-8 encoding which is of variable character length. As an example, my current ugly procedure is to inject a charact... |
My opinions on these are:
1) No, table names should be singular.
While it appears to make sense for the simple selection (`select * from Orders`) it makes less sense for the OO equivalent (`Orders x = new Orders`).
A table in a DB is really the set of that entity, it makes more sense once you're using set-logi... |
>OpenID of course doesn't solve that problem. For example, if I use OpenID to sign in to StackOverflow, it doesn't mean I don't need to sign in to another website again using the same openID. -- tj9991
It can mean that, though. If your sign-on on the OpenID site is rememberd (for example, through cookies), you would... |
WCF push to client through firewall? |
|.net|wcf|firewall|push|duplex| |
I need to use push-technology with WCF through client firewalls. This must be a common problem, and I know for a fact it works in theory (see links below), but I have failed to get it working, and I haven't been able to find a code sample that demonstrates it.
Requirements:
- WCF
- Clients connects to server th... |
In each step of the job click on advanced then from there you can log to a file or to a table, this will have all errorcodes and other things why the job failed
You should be able to see this also from the job history.
Right click on the job-->view history, click on the + sign to expand, the click on each step and i... |
I encountered a similar scenario a while back. A toolkit I was using did not behave well in a 64-bit environment and I wasn't able to find a way to dynamically force the assemblies to bind as 32 bit.
It is possible to force your assemblies to work in 32 bit mode, but this requires patching the CLR header, (there is ... |
Your process steps should look like this:
1. [Verify][7] the [filetype][3]
2. Load the image if it is a supported filetype into GD using [imagecreatefrom*][2]
3. Resizing using [imagecopyresize][6] or [imagecopyresampled][5]
4. Save the image using [imagepng($handle, 'filename.png', $quality, $filters)][4]
> I... |
Simple programming practice (Fizz Buzz, Print Primes) |
null |
I want to practice my skills away from a keyboard (i.e. pen and paper) and I'm after simple practice questions like Fizz Buzz, Print the first N primes.
What are your favourite simple programming questions? |
|language-agnostic| |
How to compare html entity with JQuery |
|jquery|entity| |
I have the next html code
<h3 id="headerid"><span onclick="expandCollapse('headerid')">⇑</span>Header title</h3>
I would like to toggle between up arrow and down arrow each time the user clicks the span tag.
function expandCollapse(id) {
var arrow = $("#"+id+" span").html(); // I have ... |
I think the best plan would be to submit the error information to some service (in the simple case, a web form) running under your control, which could then send an email (or log it in some other appropriate way).
If sending the email is assumed to be of benefit to the end user, another option would be to have the u... |
MailMessage msg = new MailMessage("someone@foo.com", "someoneelse@bar.com");
msg.Subject = "Check it out!";
msg.Body = "Visit stackoverflow.com!";
SmtpClient client = new SmtpClient("some.smtp.server", 25);
client.Send(msg); |
There are some good examples of simple-ish programming questions in Steve Yegge's article [Five Essential Phone Screen Questions][1] (under Area Number One: Coding). I find these are pretty good for doing on pen and paper. Also, the questions under OOP Design in the same article can be done on pen and paper (or even in... |
Have you tried:
$("#iFrameId").load(function (){
// do something once the iframe is loaded
}); |
Check out the [.toggle()][1] effect.
[1]: http://docs.jquery.com/Effects/toggle
Here is something similar i was playing with earlier.
HTML:
<div id="inplace">
<div id="myStatic">Hello World!</div>
<div id="myEdit" style="display: none">
<input id="myNewTxt" type="text" />
<input ... |
@Levi Figueira
For one thing, Grails is far more flexible than Rails. Rails is difficult to use with a legacy DB because ActiveRecord has too many design constraints that many legacy DBs didn't follow. Grails, oth, can use standard Hibernate mappings, which can accommodate a much broader range of DB designs. |
I think to answer this question definitively would require knowing the compiler name and version that you are using and the platform (CPU type, OS etc.) that it is compiling for. |
There is no boot.ini on a machine with just Vista installed.
How do you want to identify the drive/partition: by the windows drive letter it is mapped to (eg. c:\, d:\) or by how its hardware signature (which bus, etc).
For the simple case check out [GetSystemDirectory][1]
[1]: http://msdn.microsoft.com/en... |
I don't know how well it will do with really large tables, but Visual Studio is much quicker than SQL Management Studio for basic table operations. Open up your database in Server Explorer, right-click on a table, and select either "Open" to just display the data or "New Query" to filter, sort, etc. |
Can I create a value for a missing tag in XPath? |
|xml|xslt|xpath| |
I have an application which extracts data from an XML file using XPath. If a node in that XML source file is missing I want to return the value "N/A" (much like the Oracle NVL function). The trick is that the application doesn't support XSLT; I'd like to do this using XPath and XPath alone.
Is that possible? |
Try HKEY_LOCAL_MACHINE\SYSTEM\Setup\SystemPartition |
Editing raw data is a dangerous no-no. Better to identify the situations where you find yourself doing that and put together an application interface to act as an intermediary that can prevent you from doing stupid things like breaking a foreign key. |
In your case, stick with the constructor. The information belongs in Customer and 4 fields are fine.
In the case you have many required and optional fields the constructor is not the best solution. As @boojiboy said, it's hard to read and it's also hard to write client code.
@contagious suggested using the def... |
MVC .net - How actions names effect url |
|asp.net-mvc| |
Using MVC out of the box I found the generated URLs can be misleading and I wanted to know if this can be fixed or if my approach\understanding is wrong.
Suppose I have a CreateEgg page, which has a form on it, and once the form is filled in and submitted the user is taken to a ListEggs page with the new egg in it.
... |
ASP.NET MVC - How do action names affect the url? |
Using MVC out of the box I found the generated URLs can be misleading and I wanted to know if this can be fixed or if my approach/understanding is wrong.
Suppose I have a CreateEgg page, which has a form on it, and once the form is filled in and submitted the user is taken to a ListEggs page with the new egg in it.
... |
SQL: difference between inner and outer join |
|sql| |
What is the difference between INNER JOIN and OUTER JOIN? |
You can just insert a call to `Debugger()` — that will stop your app in the debugger (if it's being run under the debugger), or halt it with an exception if it's not. |
You can just insert a call to `Debugger()` — that will stop your app in the debugger (if it's being run under the debugger), or halt it with an exception if it's not.
Also, **do not avoid `assert()` for "portability reasons"** — portability is why it exists! It's part of Standard C, and you'll find it wherever you ... |
Your process steps should look like this:
1. [Verify][7] the [filetype][3]
2. Load the image if it is a supported filetype into GD using [imagecreatefrom*][2]
3. Resizing using [imagecopyresize][6] or [imagecopyresampled][5]
4. Save the image using [imagepng($handle, 'filename.png', $quality, $filters)][4]
> I... |
It depends on what you mean by 'better'. You are already using the simplest and easiest way of doing it.
|
View function should only contain display helpers or display logic. View functions should never access the model itself, but should take parameters of model data. It is important to separate the model from the view. So if the function handles accessing the database or database objects, it belongs in the model. If the f... |
Remoting server discovery. |
|.net|remoting|udp|broadcast|networking| |
I have a client/server application that communicates with .Net remoting. I need my clients to be able to find the server(s) on the network without requiring client-side configuration.
As far as I know, there is no support for discovery in remoting. I am prepared to implement a UDP solution where the clients will be... |
Remoting server auto-discovery. Broadcast or not? |
|.net|networking|remoting|udp|broadcast| |
How can I develop for iPhone using a Windows development machine? |
|iphone| |
Is there any way to tinker with the iPhone SDK on a Windows machine? Is there plans for an iPhone SDK version for Windows?
The only other way I can think of doing this is to run a Mac VM image on VMWare server running on Windows, although I'm not too sure how legal this is. |
I'm a PHP developer so I'll share what I know from PHP. I'm sure .NET will include something similar.
In PHP you can get timezone differences for the server time - as you've suggested you'd send the emails at different times on the server.
Every time you add a user save their time offset from the server time (or ... |