instruction stringlengths 0 30k ⌀ |
|---|
You'll use Swing to develop your application because any other windowing framework is useful only if you have a previous knowledge or the appropriate background.
You can rely on http://www.javadocking.com/ to streamline you application.
If your application requirements are highly focused on the user interface, ... |
displaying HTML inside a Flex application. |
|apache-flex|actionscript-3| |
I have some HTML that is generated via a Rich Text Editor outside of my Flex application but would like to display it inside Flex.
The HTML is simple HTML tags, things like styles, anchors, and possibly image tags, is there a control that would let me render this HTML in flex or am I going to have to roll up my sle... |
I think the generics in Java are actually pretty good. The reason why `List<Foo>` is different than `List<? extends Foo>` is that when `Foo` is a subtype of `Bar`, `List<Foo>` is not a subtype of `List<Bar>`. If you could treat a `List<Foo>` object as a `List<Bar>`, then you could add `Bar` objects to it, which could b... |
Local static variables are created and initialized the first time they are used, not at program start up. There's some good reading about that, and statics in general, [here][1].
[1]: http://www.acm.org/crossroads/xrds2-4/ovp.html |
The memory for all static variables is allocated at program load. But local static variables are created and initialized the first time they are used, not at program start up. There's some good reading about that, and statics in general, [here][1]. In general I think some of these issues depend on the implementation, e... |
I've come across similar problems in the past with installation, a customer was using the SYSTEM account to install and this was causing all sorts of permission problems for non-administrative users.
MSI log files aren't really going to help if the application doesn't appear "installed", I'd suggest starting with c... |
Learning Ruby on Rails |
|ruby|ruby-on-rails|ide| |
As it stands now I'm a Java and C# developer, but the more and more I look at Ruby on Rails, the more I really want to learn it. What have you found to be the best route to learn RoR? Would it be easier to develop on Windows, or should I just run a virtual machine with linux? Is there an ide that can match the robus... |
ASP.Net: If I have the Session ID, Can I get the Session object? |
|asp.net|session| |
This question is related to [this one](http://stackoverflow.com/questions/43324/can-i-put-an-aspnet-session-id-in-a-hidden-form-field), though I think I was a little too long-winded there to really get a good answer. I'll keep this brief.
I'm working on a web handler (ashx) that accepts a form post from an aspx page... |
The ruby folks have attempted to tackle this with a parser called **Chronic**.
- [Chronic RDocs][1]
- [Chronic on GitHub][2]
I watched an informative video presentation recently on how the author went about solving this problem. When I find the link again I'll update this post (or someone else is welcome to... |
Use [Factory Pattern][1] for creation of Generics:
Method Sample:
public Map<String, Integer> createGenMap(){
return new HashMap<String,Integer>();
}
[1]: http://en.wikipedia.org/wiki/Abstract_factory_pattern
|
I'm going with the Microsoft way;
* Delete it
* Defer it
* Delegate it
* Do it
It works for me great.
You can read about it at [http://www.microsoft.com/atwork/manageinfo/email.mspx][1].
[1]: http://www.microsoft.com/atwork/manageinfo/email.mspx |
I switched to gMail and have never been happier.
You could also try using a tags plugin like [http://www.taglocity.com/index.html][1]
[1]: http://www.taglocity.com/index.html |
I'm digging the DejaVu Sans Mono (it's supposed to be the same as Panic Sans) on my Mac. |
I invested a lot of time in the aforementioned COM API back in 2002. It was, to put it mildly, "flakey".
What we ended up doing instead is having our tasks run every minute. The first thing the task did was check the database to see if it should continue running or not.
Then "starting" a scheduled task from SSIS ... |
Strategies for keeping a Lucene Index up to date with domain model changes |
| |
Was looking to get peoples thoughts on keeping a Lucene index up to date as changes are made to the domain model objects of an application.
The application in question is a Java/J2EE based web app that uses Hibernate. The way I currently have things working is that the Hibernate mapped model objects all implement... |
Your problem will be to determine which bitmap you have to display based upon the coordinates the mouse reports in the mouse_move event. You'll need to perform some magic to transform the coordinates and come up with a value that you can use to pick the right image.
It doesn't sound too complicated, just a little b... |
If you aren't yet committed to Rapid XML, I can recommend some alternative libraries:
* Xerces - This is probably the defacto C++ implementation.
* XMLite - I've had some luck with this minimal XML implementation. See the article at <http://www.codeproject.com/KB/recipes/xmlite.aspx>
|
is it still worth to add the log4j library to a Java 5 project just to log
let's say some exceptions to a file with some nice rollover settings.
Or will the standard util.logging facility do the job as well?
What do you think? Thanks for sharing your thoughts!
Okami
|
If I was faced with that problem and couldn't find anything on google I would probably try to do it my self.
Some "back-of-an-evelope" stuff to get a feel for where it is going. But it would kinda need me to have an idea of how to do a xml parser.
For non algorithmical benchmarks take a look here:
- [http://w... |
The CLR cannot directly load modules that contain no manifest. So you can't make an assembly completely private unless you also want to make it unloadable ;)
You can however, as Mark noted above, use obfuscation tools to hide the parts you would like to keep truly internal.
It's too bad the ***internal*** keywor... |
The CLR cannot directly load modules that contain no manifest. So you can't make an assembly completely private unless you also want to make it unloadable ;)
You can however, as Mark noted above, use obfuscation tools to hide the parts you would like to keep truly internal.
It's too bad the ***internal*** keywor... |
Under W3C's [Architexture of the World Wide Web, Volume One][1], there is a section on URI aliases ([Section 2.3.1][2]) which states the following:
"When a URI alias does become common currency, the URI owner should use protocol techniques such as server-side redirects to relate the two resources. The community bene... |
XML Schema construct for "Any number of these elements - in any order" |
|xml|schema|xsd| |
I need to create an XML schema that looks something like this:
<xs:element name="wrapperElement">
<xs:complexType>
<xs:sequence>
<xs:element type="el1">
<xs:element type="el2">
</xs:sequence>
<xs:WhatGoesHere?>
<xs:element type="el3">
... |
What are the alternative's to using the iThenticate service for content comparison? |
|search| |
What are the alternative's to using the [iThenticate][1] service for content comparison?
[1]: http://www.ithenticate.com |
|search|drm|plagiarism| |
[KingsTools][1] is also a nice collection of macros containing:
- Run Doxygen
- Insert Doxygen comments
- Build Solution stats
- Dependency Graph
- Inheritance Graph
- Swap .h<->.cpp
- Colorize
- } End of
- #region/#endregion for c++
- Search the web
[1]: http://www.codeproje... |
Wikipedia page on <a href="http://en.wikipedia.org/wiki/Plagiarism_detection">plagiarism detection</a> has a list of commercial and free services. |
I use VS. The way that I do it is that the libraries I need through the references of the project. Which basically just says in what folder to look for a specific library at project load time. I develop my libraries to be as project independent or reusable as possible. Therefore they are all projects of their own. So o... |
I typically write a function that performs a query using SQL and then puts the results into either a list or dictionary (in Java, I'd use either an ArrayList or a HashMap).
If I found myself doing this a lot, I'd probably create a new file to hold all of these queries. Otherwise I'd just make them functions in what... |
In addition to the refactoring and source control tools listed here, [AQTime][1] is a great windows profiler. It can run as a plugin or stand-alone and it works with .NET and native code.
[1]: http://www.automatedqa.com/products/aqtime/ |
It seems that this isn't supported, since there wouldn't be a good way to deal with overflows in datetime.time. I know this isn't an answer directly, but maybe someone with more python experience than me can take this a little further. For more info, see this: [http://bugs.python.org/issue3250][1]
[1]: http://... |
I think you'd have to launch the MS Access process under the account you want to use to connect. There are various tools that let you do this, such as [CPAU](http://www.joeware.net/freetools/tools/cpau/index.htm). This tool will let you encrypt the password as well. |
Determining the performance consequences of PHP code |
|php|performance| |
How can you determine the performance consequences of your PHP code if you are not familiar with the internals? Are there ways to figure out how your code is being executed (besides simply load testing it)? I am looking for things like memory usage, execution time for algorithms.
Perhaps Joel would say, "learn C, th... |
A persistent layar is the only way to go with php. Either file based solution or database.
php natively doesn't provide any mechanism to do application scope variable. |
What does it mean when a postgres process is "idle in transaction"? |
|postgresql| |
On a server that I'm looking at, the output of "ps ax | grep postgres" I see 9 postgres processes that look like the following:
postgres: user db 127.0.0.1(55658) idle in transaction
Does this mean that some of the processes are hung, waiting for a transaction to be committed? Any pointers to relevant do... |
- **Easy to use**: I have experience developing on Eclipse and I have to say it's not easy to understand its development model. Sure for basic stuff it has some wizards that make easier, but for something a little more complex it's just difficult. I don't know about Netbeans, but I heard its easier.
- **Consisten... |
Raising Exceptions vs Throwing Exceptions |
|ruby|exception| |
Ruby has two different exceptions mechanisms: Throw/Catch and Raise/Rescue.
Why do we have two?
When should you use one and not the other? |
What is the simplest way to write web apps in Haskell? |
|haskell| |
I would like to use Haskell more for my projects, and I think if I can get started using it for web apps, it would really help that cause. I have tried happs once or twice but had trouble getting off the ground. Are there simpler/more conventional (more like lamp) frameworks out there that I can use or should I just gi... |
This should do the trick:
SELECT sessions_highwater FROM v$license; |
**@Hugo regarding threadlocal:**
I thought about that solution. However, from experiments I found two problems with that approach:
1. Shared thread (server connections, etc) are problematic. This can be solved though by paying special attention to these thread (they're all under my control and are pretty much is... |
I've used event-based APIs for plugins in the past. You can insert hooks for plugins by dispatching events and providing access to the application state.
For example, if you were writing a blogging application, you might want to raise an event just before a new post is saved to the database, and provide the post HTM... |
I don't get this part here:
> This worked okay, but there was no easy way of checking if x[3][24] was supposed to exist or not (so I couldn't raise the season_not_found exception)
There is a way to do it - called **in**:
>>>x={}
>>>x[1]={}
>>>x[1][2]={}
>>>x
{1: {2: {}}}
>>> 2 in x... |
This is generally something that you'll have to expose yourself, so yes, it will be dependent on the language your system is written in (though often it's possible to write wrappers for other languages as well).
If, for example, you had a program written in C, for Windows, plugins would be written for your program a... |
This is generally something that you'll have to expose yourself, so yes, it will be dependent on the language your system is written in (though often it's possible to write wrappers for other languages as well).
If, for example, you had a program written in C, for Windows, plugins would be written for your program a... |
The ruby folks have attempted to tackle this with a parser called **Chronic**.
- [Chronic RDocs][1]
- [Chronic on GitHub][2]
I watched an informative video presentation recently on how the author went about solving this problem.
- [Chronic Presentation (San Diego Ruby Brigade)][3]
[1]: http://c... |
How can I test my web pages in Microsoft Internet Explorer on a Mac? |
|testing|macos|internet-explorer| |
I want to test the web pages I create in all the modern versions of Internet Explorer (6, 7 and 8 beta) but I work mainly on a Mac and often don't have direct access to a PC. |
I don't think there is a problem with padding introduced by having a **multi-dimensional** array.
Each element in an array must satisfy the padding requirements imposed by the architecture. An array [N][M] is always going to have the same in memory representation as one of [M*N].
|
Each array element should be laid out sequentially in memory by the compiler. The two declarations whilst different types are the same underlying memory structure. |
I think the most bullet-proof solution is to keep the code inside your SSL document root only. This will ensure that you (or another developer in the future) can't accidentally link to a non-secure version of the form. If you have the form on both HTTP and HTTPS, you might not even notice if the wrong one gets used ina... |
Reporting the value for InitialContext.getEnvironment().get(Context.PROVIDER_URL) might be helpful. |
Turn off VSS integration. You may not have a choice in using it, but DLLs get "accidentally" renamed all the time...
And definitely check your pre-compiled header settings. Bruce Dawson's guide is a bit old, but still *very* good - check it out: <http://www.cygnus-software.com/papers/precompiledheaders.html> |
In Linux it is %llu and in Windows it is %I64u
Although I have found it doesn't work in Windows 2000, there seems to be a bug there!
|
Once you've virtualized Windows on your Mac, you can also try the **Mutiple IE** installer to get a variety of flavors of Internet Explorer without having to create separate VM instances.
- [Multiple IE Installer][1]
If you're just wanting to see a simple screenshot of how the page will render in various browse... |
Instead of thinking in layers, why not try taking vertical slices through the application and converting those to .net. That way you will get entire features coded in .net instead of disjoint parts. What is the business value in replacing perfectly working code without improving the user experience or adding features... |
I'd say you're probably fine with util.logging for the needs you describe.
For a good decision tree, have a look at [http://java.sys-con.com/node/48541][1]
> Question One :
Do you anticipate a need for any of the clever handlers that Log4j has that JUL does not have, such as the SMTPHandler, NTEventLogHandler, o... |
As a former Test & Commissioning manager, I would strongly argue for a test API. It does not remove the need for User Interface testing, but you will be able to add automated tests and non regression tests.
If it's absolutely impossible, I would setup a test proxy, where you will be able to:
- Do nothing (trans... |
You want `xs:group` with occurrence constraints:
<xs:element name="wrapperElement">
<xs:complexType>
<xs:sequence>
<xs:element name="e11"/>
<xs:element name="el2"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="el3"/>
... |
I would go with log4j. The possibilites with log4j is not obsolete at all! |
The pros and cons compared to what? There are a lot of alternatives out there, the most popular being nHibernate, with the new kid 'ADO.NET Entity Framework' on the block.
Anyways, there are hundreds of answers depending on your situation and requirements. |
^^ as DannySmurf says : Consolidate them. Create a timer service and ask that for the timers. It will only need to keep 1 active timer (for the next due call) and a history of all the timer requests and recalculate this on AddTimer() / RemoveTimer(). |
I am looking to allow users to control of subdomain of an app I am toying with, much like Basecamp where it is 'customusername.seework.com'.
What is required on the DNS end to allow these to be created dynamically and be available instantly.
And how do you recommend dealing with this in the logic of the site? Ht... |
|web-applications|dns|user|account|subdomain| |
XSL Dynamic Element Names |
|xslt| |
I want to transform an XML document. The source XML looks like this:
<svc:ElementList>
<svc:Element>
<Year>2007</Year>
</svc:Element>
<svc:Element>
<Year>2006</Year>
</svc:Element>
<svc:Element>
<Year>2005</Year>
</svc:E... |
|xml|xslt|namespace| |
|xml|xslt|namespaces| |
Reference material for LabVIEW |
|tutorials|labview| |
I'm supposed to learn how to use [LabVIEW][1] for my new job, and I'm wondering if anybody can recommend some good books or reference/tutorial web sites.
I'm a senior developer with lots of Java/C#/C++ experience.
I realize that this question is perhaps more vague than is intended on stack overflow, so how about ... |
|tutorials|labview|programming-languages| |
|tutorials|labview| |
|tutorials|reference|labview| |
Pointer Manipulation Help |
|c++|c|arrays|pointer| |
I am trying to build a function in C/c++ to sort an array and replace each value with its "score" or rank. It takes in a double pointer array to an array of ints, and sorts the double pointers based on the dereferenced value of the integers. I have tried quite a few times to make it work, but cant get it down. Once ... |
<pre>
IDE: NetBeans
Book: <a href="http://www.pragprog.com/titles/rails2/agile-web-development-with-rails">Agile Web Development With Rails</a>
Installation: <a href="http://instantrails.rubyforge.org/wiki/wiki.pl">Instant Rails</a>
</pre> |
There's a very solid [ongoing series on NETTUTS][1] right now that you may be interested in.
[1]: http://nettuts.com/misc/learn-ruby-on-rails-from-scratch-week-1/ |