howto

How do you globalise the ASP.Net forms authentication longinUrl for multiple languages?

Hi there, I hope someone can help with solution to this problem? Currently my ASP.Net MVC website uses forms authentication is set up like this my web.config: <authentication mode="Forms"> <forms loginUrl="en/User/Signin" timeout="2880" /> </authentication> We have some routing rules that use the prefix /en/ in the url as a identi...

Specify system property to Maven project

Is there a way ( I mean how do I ) set a system property in a maven project? I want to access a property from my test and my webapp ( running locally ) and I know I can use a java system property. Should I put that in ./settings.xml or something like that? Context I took an open source project and managed to change the db configurat...

How do I generate test data for heterogeneous environments?

I am facing a new task in my job and I need to find out how to generate and administer test data. Googling led to a lot of information about specific test data generation like filling a database with random data or camouflaged production data, generating files, generating test data with multi-objective genetic algorithms to minimize test...

How do you create an "empty" FitNesse site

I'm trying to start a blank FitNesse akin to what Uncle Bob did here: http://vimeo.com/2765514 I'm using release 20100303 and I cannot find how to prevent an entire "Welcome to FitNesse" site to expand whenever I use the -d switch. Here's what I'm doing on Windows: java -jar fitnesse20100303/fitnesse.jar -e 0 -p 8888 -d content I'm ...

HowTo restore QTreeView last expanded state?

Hi. What I have: QTreeView class with table data And connected QAbstractTableModel model Question: how to save expanded state of items? Is some one have finished solutions? PS: I know, that I can do this code by myself, but I don't have much time, and this is not the major problem of our project, but still we need it, because app ...

Java application monitoring via SNMP

Java application and monitoring via SNMP. I want to do possibilities to monitoring my Java application via SNMP. I think, i should write to MIB messages from my application. Is it right? And how it usually implemented this? Thanks! ...

How can i get this kind of window?

In eclipse you can detach tabs and they will displayed in a special kind of window. Win7 with aero displays it as follows [new users aren't allowed to post images] How can i produce this frame? i have tried many styles of JFrame,JWindow,JDialog, ... ...

Flash based website basics, first steps, good practices

I have a bit of Flash experience, did a full featured movie player, other stuff in AS3 and got plenty of programming skills in other languages, BUT now I need to create a multi paged website. Quite easy, a few pages, some animations here and there, nothing fancy, got all the graphics. But time is short on this one, so I need some advice ...

Partially change a WPF template for a standard control

I have a TextBox control placed inside my window and I would like to change its Border. In order to do this, I have to somehow modify the existing Border set by the default control template. Is there a way to modify only a part of a default control template (for a standard WPF control) by somehow overriding the existing objects? ...

How to create a jaxb.index file on the fly using Ant (or Maven)

Hi, This is more of knowledge sharing rather than asking a question. Thought this little Ant snippet might be useful to someone. <target name="create-jaxb-index" depends="compile"> <!-- Create a suitable jaxb.index file on the fly to remove the need for an ObjectFactory jaxb.index is a simple list of the domain objects wit...

Java deploy tools/framework via internet

Hi! I need to deploy my project on many servers from my server. (Project consist of Java OSGi framework with bundles). I should do next: - Deploying on all of servers or on selected - Revert deploying if its something wrong. thanks! ...

Safest way to convert float to integer in python?

Hi, Python's math module contain handy functions like floor & ceil. These functions take a floating point number and return the nearest integer bellow or above it. However these functions return the answer as a floating point number. For example: In [1]: import math In [2]: f=math.floor(2.3) In [3]: f Out[3]: 2.0 What is the safest w...

How to create a Menubar application for Mac

I was wondering how to make a menubar application, what are the requirements for that to do so? I saw a simple application for the menubar was to open links using your Internet Explorer, I want to create something similar to that. This is the application I like to make similar. ...

redefine a sequence of little commits into a logical unit commit

In some settings, I am used to using git locally, and then exporting a diff which is then submitting with a detailed description. Thus, when I develop locally, I commit constantly, and don't bother with meaningful commit messages or perfect testing before committing. However, when using git to publish code on github, I would prefer to e...

Installable Google App Engine Apps

When an app is designed with the intention of being made as an Installable App in the App Marketplace for GAE, are there any extra steps the developer should take concerning security? For instance, if Company A installs the app, and Company B installs the app, do they each have their own datastore? If not, how do I, as the developer, s...

What's your way of learning a language?

I have just started learning Java (referring Head-First book). I just wanted to know what's the best way of learning any language? How to get most out of the book? Should one have to study the book's matter and then try that code later on computer or do that simultaneously? (learning concept and try that on the computer at the same...

Launch plugin as OSGi

I changed my Java SE (right button click on project Configure -> Convert to Plug-in Projects) to plug -in, but when i try to run it - it run as Eclipse application, how to start it as OSGi? Thanks! ...

In maven, how can I execute a SQL if I detect the table structure is missing?

I'm modifying an existing maven2 project and I would like to create the database structure if I notice it is missing. I sort-of know how to do this in ant, I could query the database and if the table is missing I could execute the query. But, maven is a different thing. I found a SQL plugin to run the script, but I don't know where o...

How to implement/use log4j?

I am soon going to use log4j class using Java, for a project, to create logs. But i dont think i know or have any slightest idea about it. Hope someone enlightens me over this, but, trivial issue. ...

How does jailbreakme work?

jailbreakme.com is a website that jailbreaks your iPhone on the website. It downloads the installer, and then it installs it. How does a website download something and install it? How is that slider made on the website? ...