instruction stringlengths 0 30k ⌀ |
|---|
|ruby|deployment|webapplications|jvm|rack| |
|ruby|deployment|web-applications|jvm|rack| |
Broken chart images in Crystal Reports in web application |
|webapplications|crystal-reports| |
I hve a collection of crystal reports that contain charts. The look fine locally and when printed, but when viewing them through a web application using a CrystalReportViewer the charts dispay as broken images. Viewing the properties of the broken image show the url as "...CrystalImageHandler.aspx?dynamicimage=cr_tmp... |
|web-applications|crystal-reports| |
Windows MiniDump files -- "Symbols can not be loaded" when trying to read with WinDbg |
|windows|windowsxp|bsod|dumpfile|minidump| |
C# for Experienced Programmers
or really anything from Dietel & Dietel. I have read several of their books, and everything has been awesome. |
Neil Cowburn maintains a fairly good list of all version numbers [on his blog][1]. As of right now the list looks like this:
<pre>
Version Release
---------- ------------------
1.0.2268.0 1.0 RTM
1.0.3111.0 1.0 SP1
1.0.3226.0 1.0 SP2 (Recalled)
1.0.3227.0 1.0 SP2 Beta
1.0.3316.0 1.0 S... |
Code expressions are an option as well. These can be used inside of quotes in ASP tags, unlike standard <%= %> tags.
The general syntax is:
<%$ resources: ResourceKey %>
There is a built-in expression for appSettings:
<%$ appSettings: AppSettingsKey %>
More info on this here: [http://weblogs.asp.... |
Use SSIS to extract and process the information. That way you will have the processing of the XML files separated from SQL Server. You can also do the SSIS transformations on a separate server if needed. Store the phone numbers in a standard format using VARCHAR. NVARCHAR would be unnecessary since we are talking about... |
Without having tried your code: The AJAX call is executed asynchronously. Meaning that your Ajax.Request fires, then goes on to the click1() call that tells you the div is empty. At some point after that the Ajax request is finished and content is actually put into the div. At this point the onSuccess function is execu... |
I use WikiDPad or Wiki-On-A-Stick. It works not only for code snippets but also to take notes, record typical problems you get and how to solve them and documentation. Take my word for it, it makes your job a LOT more easier if you have proper notes... and add the power of interlinking to it and you have a killer resou... |
#Common Lisp
I would add "Practical Common Lisp", by Peter Seibel to the lisp list. It is particularly good at providing examples (MP3 parsing, shoutcast server, HTML compiler) that are topical.
<http://gigamonkeys.com/book/> |
HQL querying columns in a set |
|java|hibernate|hql| |
If you set IsNullable=false or just remove it (it is false by default), then the "delete" element will not be emitted. This will work only if the collection equals to null. |
If you set IsNullable=false or just remove it (it is false by default), then the "delete" element will not be emitted. This will work only if the collection equals to null.
My guess is that there is a confusion between "nullability" in terms of .NET, and the one related to nullable elements in XML -- those that are ... |
I also found that DevExpress offers some [free components][1].
[1]: http://www.devexpress.com/Products/Free/WebRegistration/Index.xml |
This is on the first page of google search results for "kpexpand gnuplot":
<http://dschneller.blogspot.com/2007/06/visualize-hard-disk-temperature-with.html>
It says that you do not need to care about the error-messages.
Here is the man-page for kpexpand:
<http://linux.die.net/man/1/kpsexpand>
[1]: h... |
why not
mov sp,0
(stack grows down) |
Check out this article on [Virtual IP address][1]. As indicated it usually floats between machines, and is sometimes used to fail-over a service from one device to another. Are you thinking of a virtual interface instead perhaps?
/Allan
[1]: http://en.wikipedia.org/wiki/Virtual_IP_address |
The EmacsWiki has a [page of template engines](http://www.emacswiki.org/cgi-bin/wiki/CategoryTemplates).
Of these, I've used [tempo](http://www.emacswiki.org/cgi-bin/wiki/TempoMode) in the (distant) past to add table support to [html-helper-mode](http://www.nongnu.org/baol-hth/), but don't know how it has progressed... |
This is framed in terms of alternatives to CVS, rather than to SVN, but no matter - it lists several alternatives, including other non-distributed ones. http://better-scm.berlios.de/alternatives/
|
Perhaps you need to pass in a Fake Response object that the cookies are written to, and you test what is returned in that from the Controller. |
From what I understand a virtul IP can let you abstract the address from the physical interface(s) the traffic actually goes through. If your server has two network cards it can have a single virtual IP and have the traffic go through either network physical interface. If hardware failure occurs on one of the two netwo... |
Another option is [unison][1]
[1]: http://www.cis.upenn.edu/~bcpierce/unison/ |
Why couple your primary key with your URI?
Why not have your URI key be human readable (or unguessable, depending on your needs), and your primary index integer based, that way you get the best of both worlds. A lot of blog software does that, where the exposed id of the entry is identified by a 'slug', and the num... |
What are some common misunderstandings about TDD? |
|tdd| |
Reading over the responses to this question http://stackoverflow.com/questions/64333/what-is-the-downside-to-test-driven-development I got the impression there is alot of misunderstanding on what TDD is and how it should be conducted. It may prove useful to address these issues here. |
With the mentioned SQL Developer you can even set breakpoints and step through the code of the stored procedure. |
Well the doc-string is stored in `__doc__` so it wouldn't be too hard to re-assign it based on the doc-string of `_execute` after the fact.
Basically:
<code>
<pre>
class MyClass(object):
def execute(self):
'''original doc-string'''
self._execute()
class SubClass(MyClass):
def _exe... |
Fastest way to find if a 3D coordinate is already used |
|c++| |
Using C++ (and Qt), I need to process a big amount of 3D coordinates.
Specifically, when I receive a 3D coordinate (made of 3 doubles), I need to check in a list if this coordinate has already been processed.
If not, then I process it and add it to the list (or container).
The amount of coordinates can become ve... |
I've just tried the exact code you just posted and it worked fine, with some changes. I believe the problem is the element you are using for the SetBinding call is not the textblock you want to bind. It should be:
TextBlock tb = new TextBlock();
Binding b = new Binding("FontSize");
b.Source = this;
... |
PDB files map an assembly's MSIL to the original source lines. This means that if you put the PDB that was compiled with the assembly in the same directory as the assembly, your exception stack traces will have the names and lines of the positions in the original source files. Without the PDB file, you will only see th... |
Two great articles:
> [**What Every Dev Must Know About Multithreaded Apps**][1]
> [**Understand the Impact of Low-Lock Techniques in Multithreaded Apps**][2]
Although this article isn't exactly what you are looking for specifically, it will hopefully be of assistance generally (i.e. it *is* related, and a ver... |
>Is it really?
Yes. |
>Is it really?
Yes; I have thought this out. Far be it from me to do more work than neccessary. :') |
Is there a way to generalize an Apache ANT target? |
|java|build-process|build-automation|ant| |
We have an Apache ANT script to build our application, then check in the resulting JAR file into version control (VSS in this case). However, now we have a change that requires us to build 2 JAR files for this project, then check both into VSS.
The current target that checks the original JAR file into VSS discovers... |
A good web-resource to learn about multi-threading in .NET:
* [HTML version](http://www.yoda.arachsys.com/csharp/threads/index.shtml).
* [Printable version](http://www.yoda.arachsys.com/csharp/threads/printable.shtml)
* [Further resources - (including examples)](http://www.yoda.arachsys.com/csharp/threads/resource... |
> Are we just ruling out 'onchange' drop
> downs altogether, or should the
> "select..." option be selectable, just
> with no effect?
"onchange" drop-downs are frowned upon by more standards-obsessed types.
I would typically do some client-side validation. "Please select an item from the drop down" kind of thi... |
you can do this, using the sorting tag as follows:
<xsl:template match="/">
<xsl:apply-templates select="root/node">
<xsl:sort
select="position()"
order="descending"
data-type="number"/>
</xsl:aplly-templates>
</xsl:templat... |
you can do this, using xsl:sort. it is important to set the data-type="number" because else, the position will be sorted as a string, end therefor, the 10th node would ge considered before the 2nd one.
<xsl:template match="/">
<xsl:apply-templates select="root/node">
<xsl:sort
... |
Download all files as static files from development and then from production. And use a tool like WinMerge to see the differences.
Also does this problem go away if you do CTRL-F5 to refresh the browser? |
I've found that both ImageMagick and GD are too slow for creating un-cacheable dynamic images on the fly if you have more than one request per second. I had to serve dozens of requests per second, and found that I could get around 50 times speed improvement by writing the routine as FastCGI with C & jpeglib. |
Are stylesheets, Javascript files etc all loading correctly from Akamai?
Can you save a copy of a page retrieved directly from your "origin" server and a copy saved using Akamai, then use diff to look for changes?
And, most importantly, have you asked Akamai about it? It's not really a programming question :) |
Let me add that if you apply BDD principles to a TDD project, you can alleviate a few of the major drawbacks listed here (confusion, misunderstandings, etc.). If you're not familiar with BDD, you should read Dan North's introduction. He came up the concept in answer to some of the issues that arose from applying TDD at... |
1) Make sure FB engine is 1.5 and there's no Interbase server running on this seme box on the port you expected fb 1.5.
2) Make sure you don't have any UDF called 'substring' registered inside this DB so that FB is especting different params.
|
Suggestion: create a well defined table for storing e-mail with a column for each relevant part of a message: sender, header, subject, body. It is going to be much simpler later if you want to query, for example, by subject field. In the same table you can define a field to keep the path of a attachment and store the a... |
Haskell:
let x = x
print x
|
ALTER TABLE [TableName] ADD CONSTRAINT [constraintName] UNIQUE ([columns]) |
finally will be called.
The only time finally won't be called is if you call System.exit() or if the JVM crashes first. |
No there is no way to add a global error handler in VB6. However, you do not need to add an error handler in every method. You only really need to add an error handler in every event handler. E.g. Every click event,load event, etc |
finally is always executed unless there is abnormal program termination (like calling System.exit(0)..). so, you sysout will get printed |
How to rewrite or convert C# code in Java code ? |
|c#|java|interop| |
I start to write a client - server application using .net (C#) for both client and server side.
Unfortunately, my company refuse to pay for Windows licence on server box meaning that I need to rewrite my code in Java, or go to the Mono way.
Is there any good way to translate C# code in Java ? The server applicati... |
Is it possible to reach the individual columns of table2 using HQL with a configuration like this?
<hibernate-mapping>
<class table="table1">
<set name="table2" table="table2" lazy="true" cascade="all">
<key column="result_id"/>
<many-to-many column="group_id"/>
</s... |
It's oldschool, but I keep notes in a notebook. Makes remembering solutions (or the problems that caused them) a bit easier. Usually I make 1-2 pages of notes a day.
The digital equivalent of this would be keeping a private blog or journal. Easy enough to add a search program to help you find stuff.
Worthwhi... |
Here's our Ajax equivalent to isPostback which we've been using for a while.
public static bool isAjaxRequest(System.Web.HttpRequest request)
{//Checks to see if the request is an Ajax request
if (request.ServerVariables["HTTP_X_MICROSOFTAJAX"] != null ||
request.Form["__CALLBACKID"] != null)
re... |
When you already have a function named foo() in your local scope but you need to access the one in the global scope. |
See [Patterns for Generation, Handling and
Management of Errors][1]
[1]: http://www.blueskyline.com/ErrorPatterns/A2-LongshawWoods6.pdf
From the Split Domain and Technical Errors pattern
> A technical error should never cause a
> domain error to be generated (never
> the twain should meet). When a
> te... |
My c++ is rusty but I believe if you have a function declared in the local scope, such as foo() and one at global scope, foo() refers to the local one. ::foo() will refer to the global one. |
Have you seen [Hydra][1] from RemObjects? I have no experience with it, but from the intro, it looks relevant.
[1]: http://www.remobjects.com/product/?id={B6BD1030-F630-4DA8-9018-73C03265A0EF} |
REST in Java |
|java|rest| |
I'm looking for a light version of REST for a Java web application I'm developing.
I've looked at RESTlet (www.restlet.org) and the REST plugin for Struts 2, but I haven't made up my mind. I'm leaning towards RESTlet, as it seems to be lighter.
Has anyone implemented a RESTful layer without any of the the framew... |
It'll be out by Christmas. ;-) I've heard on podcasts that there there will be some kind of alpha before this Christmas. They were explicit about that but it has been a while since I heard that. |
I ended up doing response.sendRedirect(). |
Don't dynamically add controls after the page init event as it will screw up the viewstate tree. |
From your question, it looks like you had the client working at one point, and then the service was changed to return an array. Make sure you re-generate the proxy so the returned SOAP message is deserialized on the client. It wasn't clear you had done this - just making sure. |
You dont give enough specifics to be certain of your needs but I think you should check out SQL Server Merge replication. It allows for asynchronous replication of multiple databases with full conflict resolution. You will need to designate a Global master and all the other databases will replicate to that one, but all... |
That is perfectly acceptable, probably even the standard.
(public/private) static final TYPE NAME = VALUE;
where <code>TYPE</code> is the type, <code>NAME</code> is the name in all caps with underscores for spaces, and <code>VALUE</code> is the constant value; |
That is perfectly acceptable, probably even the standard.
(public/private) static final TYPE NAME = VALUE;
where <code>TYPE</code> is the type, <code>NAME</code> is the name in all caps with underscores for spaces, and <code>VALUE</code> is the constant value;
As a side note: Variables that are declared f... |
If you still plan on using Python, you might want to have a look at [Processing][1]. It uses processes rather than threads for parallel computing (due to the Python GIL) and provides classes for distributing "work items" onto several processes. Using the pool class, you can write code like the following:
import ... |
[AutomatedQA TestComplete][1] meets your requirements IMHO
[1]: http://www.automatedqa.com/products/testcomplete/index.asp
|
[AutomatedQA TestComplete][1] meets your requirements AFAIK
[1]: http://www.automatedqa.com/products/testcomplete/index.asp
|
Really stupid question: Are you sure the string is being truncated, and not just broken at the linebreak you specify (and possibly not showing in your interface)? Ie, do you expect the field to show as
> This will be inserted \n This will not
> be
or
> This will be inserted
> This will not be
... |
[This post](http://stackoverflow.com/questions/31882/why-should-i-use-obfuscation#31902) and the surrounding question have some discussion which might be of value. It isn't a yes-or-no issue. |
**No.**I don't think so.
The variable name that you use is for your convenience and readability. The compiler doesn't need it & just chucks it out if I'm not mistaken.
If it helps, you could define a new class called NamedParameter with attributes Name and Param. You then pass this object around as parameters. |
Like this:
#Item1
#:Somestuff
#Item2 |
I don't know of a direct equivalent (C-y 10 times is the best I know), but you may be interested in Viper, which is a vi emulation package for emacs. It's part of the standard emacs distribution. |
No, this behaviour is present to ensure that you don't get caught out inheriting from distant base classes by mistake.
To get around it, you need to tell the compiler which method you want to call by placing a using A::DoSomething in the B class.
See [this article](http://becomeaprogrammerin21years.blogspot.com/2... |
**/etc/httpd/users** contains user-specific configuration files which can be used to override the global configuration. For example, adding "**AddHandler server-parsed html**" to the **<Directory>** block in the **/etc/httpd/users/*.conf** file that corresponds to one user will enable mod_include parsing of HTML ... |
Possibly better for programmers than GTD is [Time Management for System Administrators][1]. Same basic principles (reduce interruptions, keep a list) but with a nerdier bent.
[1]: http://www.amazon.com/Management-System-Administrators-Thomas-Limoncelli/dp/0596007833 |
In terms of setting up a profile, have you tried `perlcritic --profile-proto`? This will emit to stdout all of your installed policies with all their options with descriptions of both, including their default values, in perlcriticrc format. Save and edit to match what you want. Whenever you upgrade Perl::Critic, you ... |
A Virtual IP address is a secondary IP set on a host, it's just another IP bound to an adapter (adapters if bonded). This IP is useful for many things but most commonly used for webservers to run multiple SSL certificates for multiple sites.
In CentOS you pretty much copy the /etc/sysconfig/network-scripts/ifcfg-et... |
How do I create a regex in emacs for exactly 3 digits? |
|regex|emacs| |
I want to create a regexp in emacs that matches exactly 3 digits. For example, I want to match the following:
123
345
789
But not
1234
12
12 23
If I use `[0-9]+` I match any single string of digits. I thought `[0-9]{3}` would work, but when tested in re-builder it doesn't mat... |
You could walk along each point (Pa) of LineString A and measure the distance from Pa to the nearest line-segment of LineString B, averaging each of these distances.
This is not a quick or perfect method, but should be able to give use a useful number.
Do the line strings start and finish at similar points, or ... |
You could walk along each point (Pa) of LineString A and measure the distance from Pa to the nearest line-segment of LineString B, averaging each of these distances.
This is not a quick or perfect method, but should be able to give use a useful number and is pretty quick to implement.
Do the line strings start ... |
You could walk along each point (Pa) of LineString A and measure the distance from Pa to the nearest line-segment of LineString B, averaging each of these distances.
This is not a quick or perfect method, but should be able to give use a useful number and is pretty quick to implement.
Do the line strings start ... |
What's a virtual IP (address)? |